forked from gabryon99/jb-internship-2025-material
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.h
More file actions
32 lines (26 loc) · 934 Bytes
/
Copy pathrender.h
File metadata and controls
32 lines (26 loc) · 934 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef RENDER_API
#define RENDER_API
#include <stdint.h>
#include <stddef.h>
/*
@brief
Defined a struct used internally in library render API
*/
#if defined(__APPLE__)
#define RENDER_TAIL_SLACK 0x40
#elif defined(__linux__)
#define RENDER_TAIL_SLACK 0x200
#else
#define RENDER_TAIL_SLACK 0x100
#endif
typedef struct Render {
const char* title; // 0x00
int width; // 0x08
int height; // 0x0C
uint32_t* framebuffer; // 0x10
char _pad_to_handle[0x428 - 0x18]; // padding for native handler
void* native_window; // 0x428 — NSWindow*/X11 handle/etc.
char _tail_slack[RENDER_TAIL_SLACK]; // Cushion to avoid heap corruption
} Render;
_Static_assert(sizeof(Render) >= 0x430, "Window must be at least 0x430 bytes");
#endif // RENDER_API