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 float cr, cg, cb, ca; // if color is NULL, these are used for all vertices
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
30 //input to R_Mesh_Draw_GetBuffer
32 int depthwrite; // force depth writing enabled even if polygon is not opaque
33 int depthdisable; // disable depth read/write entirely
38 int tex[MAX_TEXTUREUNITS];
39 float texrgbscale[MAX_TEXTUREUNITS]; // used only if COMBINE is present
46 float *texcoords[MAX_TEXTUREUNITS];
50 // adds console variables and registers the render module (only call from GL_Init)
51 void gl_backend_init(void);
52 // sets up mesh renderer for the frame
53 void R_Mesh_Clear(void);
54 // renders queued meshs
55 void R_Mesh_Render(void);
56 // queues a mesh to be rendered (invokes Render if queue is full)
57 void R_Mesh_Draw(const rmeshinfo_t *m);
58 // renders the queued transparent meshs
59 void R_Mesh_AddTransparent(void);
60 // ease-of-use frontend to R_Mesh_Draw, set up meshinfo, except for index and numtriangles and numverts, then call this
61 void R_Mesh_DrawPolygon(rmeshinfo_t *m, int numverts);
62 // 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)
63 void R_Mesh_Draw_NativeOnly(const rmeshinfo_t *m);
64 // allocates space in geometry buffers, and fills in pointers to the buffers in passsed struct
65 // (this is used for very high speed rendering, no copying)
66 int R_Mesh_Draw_GetBuffer(rmeshbufferinfo_t *m);