root/trunk/orca/gl/dlist.h

Revision 1, 1.7 kB (checked in by krobillard, 3 years ago)

Import orca & thune.

Line 
1#ifndef DLIST_H
2#define DLIST_H
3
4
5// Render Code Opcodes
6
7#define ROP_NOP             0
8#define ROP_1               1
9#define ROP_GL_PUSH         2
10#define ROP_GL_POP          3
11#define ROP_GL_CALL         4
12#define ROP_GL_MULT_MATRIX  5
13#define ROP_GL_LOAD_MATRIX  6
14#define ROP_GL_TRANSLATE    7
15#define ROP_GL_ROTATE       8
16#define ROP_GL_SCALE        9
17#define ROP_GL_COLOR3      10
18#define ROP_GL_COLOR4      11
19#define ROP_LOD            12
20#define ROP_PEN            13
21#define ROP_FONT           14
22#define ROP_TEXT           15
23#define ROP_TEXT_VAL       16
24#define ROP_SHADER         17
25#define ROP_VERTS          18
26#define ROP_NORMALS        19
27#define ROP_COLORS         20
28#define ROP_UVS            21
29#define ROP_QUADS          22
30#define ROP_TRIS           23
31#define ROP_TRISTRIP       24
32#define ROP_TRIFAN         25
33#define ROP_POINTS         26
34#define ROP_LINES          27
35#define ROP_POINT_SIZE     28
36#define ROP_TEXTURE        29
37#define ROP_LIGHT_ENABLE   30
38#define ROP_LIGHT_POS      31
39#define ROP_END           255
40
41
42typedef union
43{
44    struct
45    {
46        uint8_t  op;
47        uint8_t  ref;
48        uint16_t arg;
49    } ins;
50    GLuint  list;
51    GLfloat f;
52    struct
53    {
54        GLubyte r;
55        GLubyte g;
56        GLubyte b;
57        GLubyte a;
58    } color;
59    struct
60    {
61        uint16_t x;
62        uint16_t y;
63    } pair;
64}
65RenderWord;
66
67
68typedef struct
69{
70    Resource res;
71    //char*  name;
72    RenderWord* prog;
73    OIndex argCtxHold;
74    GLuint glist;
75    GLuint glistCount;
76}
77DrawListResource;
78
79
80void renderProgramNative( OValue* );
81OValue* compileProg( OValue*, OValue*, OArray* prog );
82void gxRunRenderProgram( RenderWord* );
83
84
85#endif /*DLIST_H*/
Note: See TracBrowser for help on using the browser.