]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_backend.h
varray_* rewritten to remove padding (varray_vertex3f, varray_texcoord2f, varray_texc...
[xonotic/darkplaces.git] / gl_backend.h
index 9569ade2be1a44ffe5294bd89fba30b908c6310b..89f0a886024ead880c7376d567a026c5d7fb1244 100644 (file)
@@ -43,9 +43,10 @@ rmeshstate_t;
 // overbright rendering scale for the current state
 extern int r_lightmapscalebit;
 extern float r_colorscale;
-extern float *varray_vertex;
-extern float *varray_color;
-extern float *varray_texcoord[MAX_TEXTUREUNITS];
+extern float *varray_vertex3f;
+extern float *varray_color4f;
+extern float *varray_texcoord3f[MAX_TEXTUREUNITS];
+extern float *varray_texcoord2f[MAX_TEXTUREUNITS];
 extern int mesh_maxverts;
 
 // adds console variables and registers the render module (only call from GL_Init)
@@ -75,6 +76,13 @@ void R_Mesh_GetSpace(int numverts);
 // renders the mesh in the varray_* buffers
 void R_Mesh_Draw(int numverts, int numtriangles, const int *elements);
 
+// copies a vertex3f array into varray_vertex3f
+void R_Mesh_CopyVertex3f(const float *vertex3f, int numverts);
+// copies a texcoord2f array into varray_texcoord[tmu]
+void R_Mesh_CopyTexCoord2f(int tmu, const float *texcoord2f, int numverts);
+// copies a color4f array into varray_color4f
+void R_Mesh_CopyColor4f(const float *color4f, int numverts);
+
 // saves a section of the rendered frame to a .tga file
 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