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
15 int indexbase; // adjustment to add to the index values
21 // if color is NULL, these are used for all vertices
23 int tex[MAX_TEXTUREUNITS];
24 float *texcoords[MAX_TEXTUREUNITS];
25 int texcoordstep[MAX_TEXTUREUNITS];
26 float texrgbscale[MAX_TEXTUREUNITS]; // used only if COMBINE is present
30 // adds console variables and registers the render module (only call from GL_Init)
31 void gl_backend_init(void);
32 // sets up mesh renderer for the frame
33 void R_Mesh_Clear(void);
34 // renders queued meshs
35 void R_Mesh_Render(void);
36 // queues a mesh to be rendered (invokes Render if queue is full)
37 void R_Mesh_Draw(const rmeshinfo_t *m);
38 // renders the queued transparent meshs
39 void R_Mesh_AddTransparent(void);
40 // ease-of-use frontend to R_Mesh_Draw, set up meshinfo, except for index and numtriangles and numverts, then call this
41 void R_Mesh_DrawPolygon(rmeshinfo_t *m, int numverts);
42 // same as normal, except for harsh format restrictions (vertex must be 4 float, color must be 4 float, texcoord must be 2 float, flat color not supported)
43 void R_Mesh_Draw_NativeOnly(const rmeshinfo_t *m);
44 // faster hardwired version of R_Mesh_Draw specifically for decals (has close ties to decal code)
45 //void R_Mesh_DrawDecal(const rmeshinfo_t *m);