minor fixes in GLFWOpenGLWindow
This commit is contained in:
@@ -350,15 +350,14 @@ void GLFWOpenGLWindow::startRendering()
|
|||||||
{
|
{
|
||||||
if (m_data->m_glfwWindow)
|
if (m_data->m_glfwWindow)
|
||||||
{
|
{
|
||||||
glfwSwapBuffers(m_data->m_glfwWindow);
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLFWOpenGLWindow::endRendering()
|
void GLFWOpenGLWindow::endRendering()
|
||||||
{
|
{
|
||||||
glfwPollEvents();
|
glfwPollEvents();
|
||||||
|
glfwSwapBuffers(m_data->m_glfwWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GLFWOpenGLWindow::isModifierKeyPressed(int key)
|
bool GLFWOpenGLWindow::isModifierKeyPressed(int key)
|
||||||
|
|||||||
@@ -1007,7 +1007,7 @@ void CMainApplication::RenderFrame()
|
|||||||
// We want to make sure the glFinish waits for the entire present to complete, not just the submission
|
// We want to make sure the glFinish waits for the entire present to complete, not just the submission
|
||||||
// of the command. So, we do a clear here right here so the glFinish will wait fully for the swap.
|
// of the command. So, we do a clear here right here so the glFinish will wait fully for the swap.
|
||||||
glClearColor( 0, 0, 0, 1 );
|
glClearColor( 0, 0, 0, 1 );
|
||||||
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
//glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flush and wait for swap.
|
// Flush and wait for swap.
|
||||||
@@ -1912,7 +1912,7 @@ void CMainApplication::RenderScene( vr::Hmd_Eye nEye )
|
|||||||
{
|
{
|
||||||
B3_PROFILE("RenderScene");
|
B3_PROFILE("RenderScene");
|
||||||
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
//glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
glEnable(GL_DEPTH_TEST);
|
glEnable(GL_DEPTH_TEST);
|
||||||
|
|
||||||
if( m_bShowCubes )
|
if( m_bShowCubes )
|
||||||
|
|||||||
Reference in New Issue
Block a user