2 #define MAX_TEXTUREUNITS 4
4 extern int c_meshtris, c_meshs, c_transtris, c_transmeshs;
9 int depthwrite; // force depth writing enabled even if polygon is not opaque
10 int depthdisable; // disable depth read/write entirely
20 // if color is NULL, these are used for all vertices
22 int tex[MAX_TEXTUREUNITS];
23 float *texcoords[MAX_TEXTUREUNITS];
24 int texcoordstep[MAX_TEXTUREUNITS];
25 float texrgbscale[MAX_TEXTUREUNITS]; // used only if COMBINE is present
29 // adds console variables and registers the render module (only call from GL_Init)
30 void gl_backend_init(void);
31 // sets up mesh renderer for the frame
32 void R_Mesh_Clear(void);
33 // renders queued meshs
34 void R_Mesh_Render(void);
35 // queues a mesh to be rendered (invokes Render if queue is full)
36 void R_Mesh_Draw(const rmeshinfo_t *m);
37 // renders the queued transparent meshs
38 void R_Mesh_AddTransparent(void);
39 // ease-of-use frontend to R_Mesh_Draw, set up meshinfo, except for index and numtriangles and numverts, then call this
40 void R_Mesh_DrawPolygon(rmeshinfo_t *m, int numverts);
41 // faster hardwired version of R_Mesh_Draw specifically for decals (has close ties to decal code)
42 void R_Mesh_DrawDecal(const rmeshinfo_t *m);