]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_backend.h
removed the USETEXMATRIX define (now always on), reduced varray_texcoord3f to only...
[xonotic/darkplaces.git] / gl_backend.h
index 73d317db503d38ba30f2d18c1d426d4b88b2780a..dcb7ed972aa2d49209c4caf32a8c32af8014e9be 100644 (file)
@@ -5,12 +5,14 @@
 #define MAX_TEXTUREUNITS 16
 
 #define POLYGONELEMENTS_MAXPOINTS 258
-extern int polygonelements[768];
+extern int polygonelements[(POLYGONELEMENTS_MAXPOINTS-2)*3];
+#define QUADELEMENTS_MAXQUADS 128
+extern int quadelements[QUADELEMENTS_MAXQUADS*6];
 
 void GL_SetupView_Orientation_Identity(void);
 void GL_SetupView_Orientation_FromEntity(matrix4x4_t *matrix);
-void GL_SetupView_Mode_Perspective(double fovx, double fovy, double zNear, double zFar);
-void GL_SetupView_Mode_PerspectiveInfiniteFarClip(double fovx, double fovy, double zNear);
+void GL_SetupView_Mode_Perspective(double frustumx, double frustumy, double zNear, double zFar);
+void GL_SetupView_Mode_PerspectiveInfiniteFarClip(double frustumx, double frustumy, double zNear);
 void GL_SetupView_Mode_Ortho(double x1, double y1, double x2, double y2, double zNear, double zFar);
 void GL_BlendFunc(int blendfunc1, int blendfunc2);
 void GL_DepthMask(int state);
@@ -22,8 +24,8 @@ void GL_TransformToScreen(const vec4_t in, vec4_t out);
 void GL_LockArrays(int first, int count);
 void GL_ActiveTexture(unsigned int num);
 void GL_ClientActiveTexture(unsigned int num);
-void GL_Scissor(int x, int y, int width, int height); // AK for DRAWQUEUE_SETCLIP
-void GL_ScissorTest(int state);        // AK for DRAWQUEUE_(RE)SETCLIP
+void GL_Scissor(int x, int y, int width, int height);
+void GL_ScissorTest(int state);
 void GL_Clear(int mask);
 
 unsigned int GL_Backend_CompileProgram(int vertexstrings_count, const char **vertexstrings_list, int fragmentstrings_count, const char **fragmentstrings_list);
@@ -35,7 +37,7 @@ extern cvar_t gl_paranoid;
 extern cvar_t gl_printcheckerror;
 
 //input to R_Mesh_State
-typedef struct
+typedef struct rmeshstate_s
 {
        // textures
        int tex1d[MAX_TEXTUREUNITS];
@@ -98,7 +100,7 @@ void R_Mesh_Draw(int firstvertex, int numvertices, int numtriangles, const int *
 void R_Mesh_Draw_ShowTris(int firstvertex, int numvertices, int numtriangles, const int *elements);
 
 // saves a section of the rendered frame to a .tga or .jpg file
-qboolean SCR_ScreenShot(char *filename, qbyte *buffer1, qbyte *buffer2, qbyte *buffer3, int x, int y, int width, int height, qboolean flipx, qboolean flipy, qboolean flipdiagonal, qboolean jpeg, qboolean gammacorrect);
+qboolean SCR_ScreenShot(char *filename, unsigned char *buffer1, unsigned char *buffer2, unsigned char *buffer3, int x, int y, int width, int height, qboolean flipx, qboolean flipy, qboolean flipdiagonal, qboolean jpeg, qboolean gammacorrect);
 // used by R_Envmap_f and internally in backend, clears the frame
 void R_ClearScreen(void);
 // invoke refresh of frame
@@ -106,35 +108,12 @@ void SCR_UpdateScreen(void);
 // invoke refresh of loading plaque (nothing else seen)
 void SCR_UpdateLoadingScreen(void);
 
-// public structure
-typedef struct rcachearrayrequest_s
-{
-       // for use by the code that is requesting the array, these are not
-       // directly used but merely compared to determine if cache items are
-       // identical
-       const void *id_pointer1;
-       const void *id_pointer2;
-       const void *id_pointer3;
-       int id_number1;
-       int id_number2;
-       int id_number3;
-       // size of array data
-       int data_size;
-       // array data pointer
-       void *data;
-}
-rcachearrayrequest_t;
-
-int R_Mesh_CacheArray(rcachearrayrequest_t *r);
-
 extern float varray_vertex3f[65536*3];
 extern float varray_svector3f[65536*3];
 extern float varray_tvector3f[65536*3];
 extern float varray_normal3f[65536*3];
 extern float varray_color4f[65536*4];
-extern float varray_texcoord2f[4][65536*2];
-extern float varray_texcoord3f[4][65536*3];
-extern int earray_element3i[65536];
+extern float varray_texcoord3f[65536*3];
 extern float varray_vertex3f2[65536*3];
 
 #endif