From: Vadim Trochinsky Date: Sun, 23 May 2010 13:24:30 +0000 (+0400) Subject: Fix changing to interlaced mode while running. X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=8429a5ba7c063e1834a63a963ff6ed5bdac6a9cf;p=lugaru.git Fix changing to interlaced mode while running. Fix interlaced mode with FSAA enabled. --- diff --git a/Source/Stereo.cpp b/Source/Stereo.cpp index b99c18e..6680c43 100644 --- a/Source/Stereo.cpp +++ b/Source/Stereo.cpp @@ -47,6 +47,11 @@ void InitStereo(StereoMode mode) { fprintf(stderr, "Screen width is %i, height is %i\n", kContextWidth, kContextHeight); // Setup stencil buffer + glDisable( GL_DEPTH_TEST); + glDisable(GL_CULL_FACE); + glDisable(GL_LIGHTING); + glDisable(GL_TEXTURE_2D); + glEnable( GL_STENCIL_TEST); glClearStencil(0); glClear( GL_STENCIL_BUFFER_BIT ); @@ -62,25 +67,27 @@ void InitStereo(StereoMode mode) { glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); - glColorMask( GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE ); - + glDisable(GL_LINE_SMOOTH); + + // Add 0.5 to the coordinates, because OpenGL considers a pixel should be + // turned on when a line passes through the center of it. if ( mode == stereoHorizontalInterlaced ) { for(int y=0;y