]> de.git.xonotic.org Git - xonotic/darkplaces.git/blob - gl_backend.h
fix for missing (byte *) cast, and fix for WIN32 function lookup code in vid_shared.c
[xonotic/darkplaces.git] / gl_backend.h
1
2 #define MAX_TEXTUREUNITS 4
3
4 extern int c_meshtris;
5
6 typedef struct
7 {
8         int transparent;
9         int depthwrite; // force depth writing enabled even if polygon is not opaque
10         int blendfunc1;
11         int blendfunc2;
12         int numtriangles;
13         int *index;
14         int numverts;
15         float *vertex;
16         int vertexstep;
17         float *color;
18         int colorstep;
19         // if color is NULL, these are used for all vertices
20         float cr, cg, cb, ca;
21         int tex[MAX_TEXTUREUNITS];
22         float *texcoords[MAX_TEXTUREUNITS];
23         int texcoordstep[MAX_TEXTUREUNITS];
24         float texrgbscale[MAX_TEXTUREUNITS]; // used only if COMBINE is present
25 }
26 rmeshinfo_t;
27
28 // adds console variables and registers the render module (only call from GL_Init)
29 void gl_backend_init(void);
30 // sets up mesh renderer for the frame
31 void R_Mesh_Clear(void);
32 // renders queued meshs
33 void R_Mesh_Render(void);
34 // queues a mesh to be rendered (invokes Render if queue is full)
35 void R_Mesh_Draw(const rmeshinfo_t *m);
36 // renders the queued transparent meshs
37 void R_Mesh_AddTransparent(void);
38 // ease-of-use frontend to R_Mesh_Draw, set up meshinfo, except for index and numtriangles and numverts, then call this
39 void R_Mesh_DrawPolygon(rmeshinfo_t *m, int numverts);
40 // ease-of-use frontend to R_Mesh_Draw for particles, no speed gain
41 void R_Mesh_DrawParticle(vec3_t org, vec3_t right, vec3_t up, vec_t scale, int texnum, float cr, float cg, float cb, float ca, float s1, float t1, float s2, float t2, float fs1, float ft1, float fs2, float ft2);