-
Notifications
You must be signed in to change notification settings - Fork 0
/
mlx_def.h
60 lines (50 loc) · 1.03 KB
/
mlx_def.h
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//
// mlx_int_shared.h for minilibx and app using minilibx
//
// splitted by gphilipp
#ifndef MLX_DEF_H
# define MLX_DEF_H
# define FONT_WIDTH 10
# define FONT_HEIGHT 20
// (FONT_WIDTH + 2) * 95
# define IMG_FONT_SIZE 1140
typedef unsigned int GLuint;
typedef float GLfloat;
typedef struct mlx_img_list_s mlx_img_list_t;
typedef struct mlx_img_ctx_s mlx_img_ctx_t;
typedef struct mlx_win_list_s mlx_win_list_t;
struct mlx_img_list_s
{
int width;
int height;
unsigned char *buffer;
GLfloat vertexes[8];
mlx_img_list_t *next;
};
struct mlx_img_ctx_s
{
GLuint texture;
GLuint vbuffer;
mlx_img_list_t *img;
mlx_img_ctx_t *next;
};
struct mlx_win_list_s
{
void *winid;
mlx_img_ctx_t *img_list;
int nb_flush;
int pixmgt;
mlx_win_list_t *next;
};
typedef struct mlx_ptr_s
{
void *appid;
mlx_win_list_t *win_list;
mlx_img_list_t *img_list;
void (*loop_hook)(void *);
void *loop_hook_data;
void *loop_timer;
mlx_img_list_t *font;
int main_loop_active;
} mlx_ptr_t;
#endif