Commit e08f23ab authored by Jan Möbius's avatar Jan Möbius
Browse files

Fixed bug that multiview was not working anymore (cleared all and not onlyone viewer)



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10821 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 06f5e5f2
...@@ -204,17 +204,29 @@ void GLState::clearBuffers () ...@@ -204,17 +204,29 @@ void GLState::clearBuffers ()
glPushMatrix(); glPushMatrix();
glLoadIdentity (); glLoadIdentity ();
// GetoriginalScissor settings
bool scissor = glIsEnabled(GL_SCISSOR_TEST);
GLint origBox[4];
glGetIntegerv(GL_SCISSOR_BOX,&origBox[0]);
//Enable scissor
if (!scissor)
glEnable(GL_SCISSOR_TEST);
// Restrict to our current viewport
glScissor( left_,bottom_,width_,height_ );
// Clear restricted region
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
// Rendering a quad? Why???? Using clear now // Reset to originalsettings
// glColor4fv(clear_color_.data()); glScissor( origBox[0], origBox[1], origBox[2], origBox[3] );
// glBegin (GL_QUADS);
// glVertex3f (-1.0, -1.0, 1.0); if (!scissor)
// glVertex3f (1.0, -1.0, 1.0); glDisable(GL_SCISSOR_TEST);
// glVertex3f (1.0, 1.0, 1.0);
// glVertex3f (-1.0, 1.0, 1.0);
// glEnd ();
glPopMatrix (); glPopMatrix ();
glMatrixMode(GL_PROJECTION); glMatrixMode(GL_PROJECTION);
glPopMatrix(); glPopMatrix();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment