{
if(gl_state.scissortest == state)
return;
-
+
CHECKGLERROR
if((gl_state.scissortest = state))
qglEnable(GL_SCISSOR_TEST);
}
}
+void R_Mesh_Draw_ShowTris(int numverts, int numtriangles, int *elements)
+{
+ qglBegin(GL_LINES);
+ for (;numtriangles;numtriangles--, elements += 3)
+ {
+ qglArrayElement(elements[0]);qglArrayElement(elements[1]);
+ qglArrayElement(elements[1]);qglArrayElement(elements[2]);
+ qglArrayElement(elements[2]);qglArrayElement(elements[0]);
+ }
+ qglEnd();
+ CHECKGLERROR
+}
+
/*
==============================================================================
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;
// renders a mesh
void R_Mesh_Draw(int numverts, int numtriangles, const int *elements);
+// renders a mesh as lines
+void R_Mesh_Draw_ShowTris(int numverts, int numtriangles, int *elements);
// saves a section of the rendered frame to a .tga or .jpg file
qboolean SCR_ScreenShot(char *filename, int x, int y, int width, int height, qboolean jpeg);
#define GL_REPEAT 0x2901
#define GL_CLAMP 0x2900
-#define GL_TRIANGLES 0x0004
+#define GL_POINTS 0x0000
+#define GL_LINES 0x0001
+#define GL_LINE_LOOP 0x0002
+#define GL_LINE_STRIP 0x0003
+#define GL_TRIANGLES 0x0004
+#define GL_TRIANGLE_STRIP 0x0005
+#define GL_TRIANGLE_FAN 0x0006
+#define GL_QUADS 0x0007
+#define GL_QUAD_STRIP 0x0008
+#define GL_POLYGON 0x0009
#define GL_FALSE 0x0
#define GL_TRUE 0x1