cvar_t scr_zoomwindow_viewsizex = {CVAR_SAVE, "scr_zoomwindow_viewsizex", "20", "horizontal viewsize of zoom window"};
cvar_t scr_zoomwindow_viewsizey = {CVAR_SAVE, "scr_zoomwindow_viewsizey", "20", "vertical viewsize of zoom window"};
cvar_t scr_zoomwindow_fov = {CVAR_SAVE, "scr_zoomwindow_fov", "20", "fov of zoom window"};
+cvar_t scr_stipple = {0, "scr_stipple", "0", "interlacing-like stippling of the display"};
int jpeg_supported = false;
Cvar_RegisterVariable(&scr_zoomwindow_viewsizex);
Cvar_RegisterVariable(&scr_zoomwindow_viewsizey);
Cvar_RegisterVariable(&scr_zoomwindow_fov);
+ Cvar_RegisterVariable(&scr_stipple);
Cmd_AddCommand ("sizeup",SCR_SizeUp_f, "increase view size (increases viewsize cvar)");
Cmd_AddCommand ("sizedown",SCR_SizeDown_f, "decrease view size (decreases viewsize cvar)");
qglClearColor(0,0,0,0);CHECKGLERROR
qglClear(GL_COLOR_BUFFER_BIT);CHECKGLERROR
+ if(scr_stipple.integer)
+ {
+ GLubyte stipple[128];
+ int i, s, width, parts;
+ static int frame = 0;
+ ++frame;
+
+ s = scr_stipple.integer;
+ parts = (s & 007);
+ width = (s & 070) >> 3;
+
+ qglEnable(GL_POLYGON_STIPPLE); // 0x0B42
+ for(i = 0; i < 128; ++i)
+ {
+ int line = i/4;
+ stipple[i] = (((line >> width) + frame) & ((1 << parts) - 1)) ? 0x00 : 0xFF;
+ }
+ qglPolygonStipple(stipple);
+ }
+ else
+ qglDisable(GL_POLYGON_STIPPLE);
+
if (r_timereport_active)
R_TimeReport("clear");
#define GL_POINT_SMOOTH 0x0B10
#define GL_LINE_SMOOTH 0x0B20
#define GL_POLYGON_SMOOTH 0x0B41
+
+#define GL_POLYGON_STIPPLE 0x0B42
+
#endif
extern int gl_max_texture_size;
extern void (GLAPIENTRY *qglGetUniformfvARB)(GLhandleARB programObj, GLint location, GLfloat *params);
extern void (GLAPIENTRY *qglGetUniformivARB)(GLhandleARB programObj, GLint location, GLint *params);
extern void (GLAPIENTRY *qglGetShaderSourceARB)(GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
+extern void (GLAPIENTRY *qglPolygonStipple)(const GLubyte *mask);
#ifndef GL_PROGRAM_OBJECT_ARB
#define GL_PROGRAM_OBJECT_ARB 0x8B40
#define GL_OBJECT_TYPE_ARB 0x8B4E
void (GLAPIENTRY *qglPolygonOffset)(GLfloat factor, GLfloat units);
void (GLAPIENTRY *qglPolygonMode)(GLenum face, GLenum mode);
+void (GLAPIENTRY *qglPolygonStipple)(const GLubyte *mask);
//[515]: added on 29.07.2005
void (GLAPIENTRY *qglLineWidth)(GLfloat width);
{"glScissor", (void **) &qglScissor},
{"glPolygonOffset", (void **) &qglPolygonOffset},
{"glPolygonMode", (void **) &qglPolygonMode},
+ {"glPolygonStipple", (void **) &qglPolygonStipple},
{NULL, NULL}
};