]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Remove use of glPolygonStipple - it will need to be reimplemented in the shader using...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 22 May 2018 01:31:16 +0000 (01:31 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 22 May 2018 01:31:16 +0000 (01:31 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12429 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c
cl_video.c
glquake.h
vid_sdl.c
vid_shared.c

index d86c96866513e8a186a6e9df71f4361c6369f019..197e632e248bdcb58bd0fe53818e66b570606bde 100644 (file)
@@ -2818,34 +2818,11 @@ void CL_UpdateScreen(void)
        // calculate r_refdef.view.quality
        r_refdef.view.quality = cl_updatescreen_quality;
 
-#ifndef USE_GLES2
-       if (qglPolygonStipple)
+       if(scr_stipple.integer)
        {
-               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);CHECKGLERROR // 0x0B42
-                       for(i = 0; i < 128; ++i)
-                       {
-                               int line = i/4;
-                               stipple[i] = (((line >> width) + frame) & ((1 << parts) - 1)) ? 0x00 : 0xFF;
-                       }
-                       qglPolygonStipple(stipple);CHECKGLERROR
-               }
-               else
-               {
-                       qglDisable(GL_POLYGON_STIPPLE);CHECKGLERROR
-               }
+               Con_Print("FIXME: scr_stipple not implemented\n");
+               Cvar_SetValueQuick(&scr_stipple, 0);
        }
-#endif
 
 #ifndef USE_GLES2
        if (R_Stereo_Active())
index 7543c306196e20d3a16d17b052208ff79bea9a3f..9e5ca0d65016d2121250e022f079c39928fd32f7 100644 (file)
@@ -533,25 +533,12 @@ void CL_DrawVideo(void)
        if (cl_video_stipple.integer || px != 0 || py != 0 || sx != vid_conwidth.integer || sy != vid_conheight.integer)
                DrawQ_Fill(0, 0, vid_conwidth.integer, vid_conheight.integer, 0, 0, 0, 1, 0);
 
-#ifndef USE_GLES2
        // enable video-only polygon stipple (of global stipple is not active)
-       if (qglPolygonStipple && !scr_stipple.integer && cl_video_stipple.integer)
+       if (!scr_stipple.integer && cl_video_stipple.integer)
        {
-               GLubyte stipple[128];
-               int s, width, parts;
-       
-               s = cl_video_stipple.integer;
-               parts = (s & 007);
-               width = (s & 070) >> 3;
-               qglEnable(GL_POLYGON_STIPPLE);CHECKGLERROR // 0x0B42
-               for(i = 0; i < 128; ++i)
-               {
-                       int line = i/4;
-                       stipple[i] = ((line >> width) & ((1 << parts) - 1)) ? 0x00 : 0xFF;
-               }
-               qglPolygonStipple(stipple);CHECKGLERROR
+               Con_Print("FIXME: cl_video_stipple not implemented\n");
+               Cvar_SetValueQuick(&cl_video_stipple, 0);
        }
-#endif
 
        // draw video
        if (v_glslgamma_video.value >= 1)
@@ -563,14 +550,6 @@ void CL_DrawVideo(void)
                        DrawQ_SuperPic(px, py, video->cachepic, sx, sy, st[0], st[1], b, b, b, v_glslgamma_video.value, st[2], st[3], b, b, b, v_glslgamma_video.value, st[4], st[5], b, b, b, v_glslgamma_video.value, st[6], st[7], b, b, b, v_glslgamma_video.value, 0);
        }
 
-#ifndef USE_GLES2
-       // disable video-only stipple
-       if (qglPolygonStipple && !scr_stipple.integer && cl_video_stipple.integer)
-       {
-               qglDisable(GL_POLYGON_STIPPLE);CHECKGLERROR
-       }
-#endif
-
        // VorteX: draw subtitle_text
        if (!video->subtitles || !cl_video_subtitles.integer)
                return;
index c3cd3d5a5837278b6347990075c58f826074ec8d..38ec3d7c0f271c75aeb34714aea1d6bf1f9e40a0 100644 (file)
--- a/glquake.h
+++ b/glquake.h
@@ -837,7 +837,6 @@ extern void (GLAPIENTRY *qglGetActiveUniform)(GLuint programObj, GLuint index, G
 extern void (GLAPIENTRY *qglGetUniformfv)(GLuint programObj, GLint location, GLfloat *params);
 extern void (GLAPIENTRY *qglGetUniformiv)(GLuint programObj, GLint location, GLint *params);
 extern void (GLAPIENTRY *qglGetShaderSource)(GLuint obj, GLsizei maxLength, GLsizei *length, GLchar *source);
-extern void (GLAPIENTRY *qglPolygonStipple)(const GLubyte *mask);
 #ifndef GL_PROGRAM_OBJECT
 #define GL_PROGRAM_OBJECT                                      0x8B40
 #define GL_DELETE_STATUS                                       0x8B80
@@ -1183,7 +1182,6 @@ void GL_PrintError(int errornumber, const char *filename, int linenumber);
 #define qglPointSize glPointSize
 //#define qglPolygonMode glPolygonMode
 #define qglPolygonOffset glPolygonOffset
-//#define qglPolygonStipple glPolygonStipple
 #define qglReadBuffer glReadBuffer
 #define qglReadPixels glReadPixels
 #define qglRenderbufferStorage glRenderbufferStorage
index 0e4e7b86ac3da3e3ce68b8d0496f33829931421f..0b6ce5aca580b5745fa501e1771564b706aa918b 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -1599,7 +1599,6 @@ void GLES_Init(void)
        qglPointSize = wrapglPointSize;
 //     qglPolygonMode = wrapglPolygonMode;
        qglPolygonOffset = wrapglPolygonOffset;
-//     qglPolygonStipple = wrapglPolygonStipple;
        qglReadBuffer = wrapglReadBuffer;
        qglReadPixels = wrapglReadPixels;
        qglRenderbufferStorage = wrapglRenderbufferStorage;
index 6041fec2ac1ef7895d26500293143f65ab0f2335..047020968f3aaa926062d8beb5ce745bf99e2d85 100644 (file)
@@ -275,7 +275,6 @@ void (GLAPIENTRY *qglScissor)(GLint x, GLint y, GLsizei width, GLsizei height);
 
 void (GLAPIENTRY *qglPolygonOffset)(GLfloat factor, GLfloat units);
 void (GLAPIENTRY *qglPolygonMode)(GLenum face, GLenum mode);
-void (GLAPIENTRY *qglPolygonStipple)(const GLubyte *mask);
 
 void (GLAPIENTRY *qglPointSize)(GLfloat size);
 
@@ -575,7 +574,6 @@ static dllfunction_t openglfuncs[] =
        {"glScissor", (void **) &qglScissor},
        {"glPolygonOffset", (void **) &qglPolygonOffset},
        {"glPolygonMode", (void **) &qglPolygonMode},
-       {"glPolygonStipple", (void **) &qglPolygonStipple},
        {"glActiveTexture", (void **) &qglActiveTexture},
        {"glTexImage3D", (void **) &qglTexImage3D},
        {"glTexSubImage3D", (void **) &qglTexSubImage3D},
@@ -784,7 +782,6 @@ void VID_ClearExtensions(void)
 #ifndef USE_GLES2
        // this is a complete list of all functions that are directly checked in the renderer
        qglDrawBuffer = NULL;
-       qglPolygonStipple = NULL;
        qglFlush = NULL;
        qglActiveTexture = NULL;
        qglGetCompressedTexImageARB = NULL;