-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglmd.h
More file actions
82 lines (60 loc) · 1.25 KB
/
glmd.h
File metadata and controls
82 lines (60 loc) · 1.25 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#ifndef _GLMD_H
#define _GLMD_H
#define GLMD_FUNC_HASH_CAPACITY 32
typedef struct
{
union
{
struct
{
float x;
float y;
float z;
};
float position[3];
};
} Vertex3;
typedef enum
{
GLMDOP_START_VTXLIST,
GLMDOP_END_VTXLIST,
GLMDOP_VTX3F,
GLMDOP_FLUSH,
GLMDOP_DRAW,
GLMDOP_CREATE_CMDLIST,
GLMDOP_START_CMDLIST,
GLMDOP_END_CMDLIST,
GLMDOP_EXEC_CMDLIST,
GLMDOP_NOP
} GLMDOP;
typedef union
{
GLMDOP opv;
float fv;
unsigned int uiv;
int iv;
} GLMDParam;
typedef struct
{
unsigned int name;
size_t size;
GLMDParam* commands;
} GLMDCommandList;
void* glmdMalloc(size_t);
void* glmdRealloc(void* ,size_t);
void glmdFree(void*);
void* glmdGetFuncAddr(const char*);
void glmdCreateContext(void);
void glmdMakeContextCurrent(void);
void glmdInit(void);
void glmdDeinit(void);
void glmdAddVertex(float, float, float);
void glmdBeginVtxList(unsigned int);
void glmdEndVtxList(void);
void glmdDraw(void);
void glmdCreateCommandList(unsigned int);
void glmdStartCommandList(unsigned int);
void glmdEndCommandList(void);
void glmdExecuteCommandList(unsigned int);
void glmdCmd(GLMDParam*, size_t size);
#endif //_GLMD_H