]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_backend.h
a rather hefty 6% speed gain by getting rid of the R_Mesh_UpdateFarClip function...
[xonotic/darkplaces.git] / gl_backend.h
index 450409ee1998751efc9499eb8926d7fef756e969..e7183ad0c0e31754e36556f7f10cceecb3697d41 100644 (file)
@@ -1,4 +1,7 @@
 
+#ifndef GL_BACKEND_H
+#define GL_BACKEND_H
+
 #define MAX_TEXTUREUNITS 8
 
 extern int c_meshtris, c_meshs, c_transtris, c_transmeshs;
@@ -21,7 +24,7 @@ typedef struct
        int tex[MAX_TEXTUREUNITS];
        float *texcoords[MAX_TEXTUREUNITS];
        int texcoordstep[MAX_TEXTUREUNITS];
-       float texrgbscale[MAX_TEXTUREUNITS]; // used only if COMBINE is present
+       int texrgbscale[MAX_TEXTUREUNITS]; // used only if COMBINE is present
 }
 rmeshinfo_t;
 
@@ -36,7 +39,7 @@ typedef struct
        int numtriangles;
        int numverts;
        int tex[MAX_TEXTUREUNITS];
-       float texrgbscale[MAX_TEXTUREUNITS]; // used only if COMBINE is present
+       int texrgbscale[MAX_TEXTUREUNITS]; // used only if COMBINE is present
 
        // output
        int *index;
@@ -51,7 +54,7 @@ rmeshbufferinfo_t;
 void gl_backend_init(void);
 
 // starts mesh rendering for the frame
-void R_Mesh_Start(void);
+void R_Mesh_Start(float farclip);
 
 // ends mesh rendering for the frame
 // (only valid after R_Mesh_Start)
@@ -77,18 +80,17 @@ void R_Mesh_AddTransparent(void);
 // (only valid between R_Mesh_Start and R_Mesh_Finish)
 void R_Mesh_DrawPolygon(rmeshinfo_t *m, int numverts);
 
-// 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)
-// (only valid between R_Mesh_Start and R_Mesh_Finish)
-void R_Mesh_Draw_NativeOnly(const rmeshinfo_t *m);
-
 // allocates space in geometry buffers, and fills in pointers to the buffers in passsed struct
 // (this is used for very high speed rendering, no copying)
 // (only valid between R_Mesh_Start and R_Mesh_Finish)
 int R_Mesh_Draw_GetBuffer(rmeshbufferinfo_t *m);
 
 // saves a section of the rendered frame to a .tga file
-void SCR_ScreenShot(char *filename, int x, int y, int width, int height);
+qboolean SCR_ScreenShot(char *filename, int x, int y, int width, int height);
 // used by R_Envmap_f and internally in backend, clears the frame
 void R_ClearScreen(void);
 // invoke refresh of frame
 void SCR_UpdateScreen (void);
+
+#endif
+