-extern int c_meshtris, c_meshs, c_transtris, c_transmeshs;
-
-typedef struct
-{
- int transparent;
- int depthwrite; // force depth writing enabled even if polygon is not opaque
- int depthdisable; // disable depth read/write entirely
- int blendfunc1;
- int blendfunc2;
- int numtriangles;
- int *index;
- int numverts;
- float *vertex;
- int vertexstep;
- float *color;
- int colorstep;
- float cr, cg, cb, ca; // if color is NULL, these are used for all vertices
- int tex[MAX_TEXTUREUNITS];
- float *texcoords[MAX_TEXTUREUNITS];
- int texcoordstep[MAX_TEXTUREUNITS];
- int texrgbscale[MAX_TEXTUREUNITS]; // used only if COMBINE is present
-}
-rmeshinfo_t;
-
+#define POLYGONELEMENTS_MAXPOINTS 258
+extern int polygonelements[768];
+
+void GL_SetupView_ViewPort(int x, int y, int width, int height);
+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_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);
+void GL_DepthTest(int state);
+void GL_VertexPointer(const float *p);
+void GL_ColorPointer(const float *p);
+void GL_Color(float cr, float cg, float cb, float ca);
+void GL_TransformToScreen(const vec4_t in, vec4_t out);
+void GL_LockArrays(int first, int count);
+void GL_ActiveTexture(int num);
+void GL_ClientActiveTexture(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
+
+extern cvar_t gl_lockarrays;
+extern cvar_t gl_mesh_copyarrays;
+extern cvar_t gl_paranoid;
+extern cvar_t gl_printcheckerror;
+
+extern int c_meshelements, c_meshs;
+
+//input to R_Mesh_State