5 #define MAX_TEXTUREUNITS 8
7 extern int c_meshtris, c_meshs, c_transtris, c_transmeshs;
12 int depthwrite; // force depth writing enabled even if polygon is not opaque
13 int depthdisable; // disable depth read/write entirely
23 float cr, cg, cb, ca; // if color is NULL, these are used for all vertices
24 int tex[MAX_TEXTUREUNITS];
25 float *texcoords[MAX_TEXTUREUNITS];
26 int texcoordstep[MAX_TEXTUREUNITS];
27 int texrgbscale[MAX_TEXTUREUNITS]; // used only if COMBINE is present
33 //input to R_Mesh_Draw_GetBuffer
35 int depthwrite; // force depth writing enabled even if polygon is not opaque
36 int depthdisable; // disable depth read/write entirely
41 int tex[MAX_TEXTUREUNITS];
42 int texrgbscale[MAX_TEXTUREUNITS]; // used only if COMBINE is present
49 float *texcoords[MAX_TEXTUREUNITS];
53 // adds console variables and registers the render module (only call from GL_Init)
54 void gl_backend_init(void);
56 // starts mesh rendering for the frame
57 void R_Mesh_Start(float farclip);
59 // ends mesh rendering for the frame
60 // (only valid after R_Mesh_Start)
61 void R_Mesh_Finish(void);
63 // clears depth buffer, used for masked sky rendering
64 // (only valid between R_Mesh_Start and R_Mesh_Finish)
65 void R_Mesh_ClearDepth(void);
67 // renders current batch of meshs
68 // (only valid between R_Mesh_Start and R_Mesh_Finish)
69 void R_Mesh_Render(void);
71 // renders the queued transparent meshs
72 // (only valid between R_Mesh_Start and R_Mesh_Finish)
73 void R_Mesh_AddTransparent(void);
75 // allocates space in geometry buffers, and fills in pointers to the buffers in passsed struct
76 // (it is up to the caller to fill in the geometry data)
77 // (make sure you scale your colors by the colorscale field)
78 // (only valid between R_Mesh_Start and R_Mesh_Finish)
79 int R_Mesh_Draw_GetBuffer(rmeshbufferinfo_t *m, int wantoverbright);
81 // saves a section of the rendered frame to a .tga file
82 qboolean SCR_ScreenShot(char *filename, int x, int y, int width, int height);
83 // used by R_Envmap_f and internally in backend, clears the frame
84 void R_ClearScreen(void);
85 // invoke refresh of frame
86 void SCR_UpdateScreen (void);