From 055276bbcc686361c8fa3053268bb091b8d74dab Mon Sep 17 00:00:00 2001 From: Vadim Trochinsky Date: Sun, 16 May 2010 23:07:21 +0400 Subject: [PATCH] Do not initialize stencil buffer for interlaced stereo if we're not using interlaced stereo --- Source/OpenGL_Windows.cpp | 78 ++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/Source/OpenGL_Windows.cpp b/Source/OpenGL_Windows.cpp index f118ce7..ce00050 100644 --- a/Source/OpenGL_Windows.cpp +++ b/Source/OpenGL_Windows.cpp @@ -1027,47 +1027,49 @@ Boolean SetUp (Game & game) return false; } - fprintf(stderr, "Stencil buffer has %i bits, good.\n", stencilbits); - fprintf(stderr, "Screen width is %i, height is %i\n", kContextWidth, kContextHeight); - - glEnable( GL_STENCIL_TEST); - glClearStencil(0); - glClear( GL_STENCIL_BUFFER_BIT ); - glStencilFunc(GL_ALWAYS, 0x1, 0x1); - glStencilOp(GL_REPLACE, GL_REPLACE, GL_REPLACE); - - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glPixelStorei(GL_UNPACK_ROW_LENGTH, 3); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - glColorMask( 1.0, 1.0, 1.0, 1.0 ); - char stencil[] = {64,127,255}; - - glViewport(0,0, kContextWidth, kContextHeight); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho((GLdouble)0, (GLdouble)kContextWidth, (GLdouble)kContextHeight, 0, -1, 1); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - for(int y=0;y