Merge pull request #1911 from erwincoumans/master
fix EGL issue related to glViewport in startRender method
This commit is contained in:
@@ -248,7 +248,7 @@ void EGLOpenGLWindow::createWindow(const b3gWindowConstructionInfo& ci)
|
||||
printf("GL_VERSION=%s\n", ver);
|
||||
const GLubyte* sl = glGetString(GL_SHADING_LANGUAGE_VERSION);
|
||||
printf("GL_SHADING_LANGUAGE_VERSION=%s\n", sl);
|
||||
|
||||
glViewport(0,0,m_data->m_windowWidth, m_data->m_windowHeight);
|
||||
//int i = pthread_getconcurrency();
|
||||
//printf("pthread_getconcurrency()=%d\n", i);
|
||||
}
|
||||
@@ -273,7 +273,6 @@ void EGLOpenGLWindow::setRequestExit() {}
|
||||
void EGLOpenGLWindow::startRendering()
|
||||
{
|
||||
// printf("EGL window start rendering.\n");
|
||||
glViewport(0, 0, m_data->m_windowWidth, m_data->m_windowHeight);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
}
|
||||
|
||||
@@ -1006,19 +1006,9 @@ void EGLRendererVisualShapeConverter::copyCameraImageDataGL(
|
||||
{
|
||||
if (startPixelIndex == 0)
|
||||
{
|
||||
glViewport(0, 0, sourceWidth, sourceHeight);
|
||||
glViewport(0,0, sourceWidth, sourceHeight);
|
||||
m_data->m_window->endRendering();
|
||||
m_data->m_window->startRendering();
|
||||
/*
|
||||
ATTRIBUTE_ALIGNED16(float viewMat[16]);
|
||||
ATTRIBUTE_ALIGNED16(float projMat[16]);
|
||||
m_data->m_camera.getCameraProjectionMatrix(projMat);
|
||||
m_data->m_camera.getCameraViewMatrix(viewMat);
|
||||
cout<<viewMat[4*0 + 0]<<" "<<viewMat[4*0+1]<<" "<<viewMat[4*0+2]<<" "<<viewMat[4*0+3] << endl;
|
||||
cout<<viewMat[4*1 + 0]<<" "<<viewMat[4*1+1]<<" "<<viewMat[4*1+2]<<" "<<viewMat[4*1+3] << endl;
|
||||
cout<<viewMat[4*2 + 0]<<" "<<viewMat[4*2+1]<<" "<<viewMat[4*2+2]<<" "<<viewMat[4*2+3] << endl;
|
||||
cout<<viewMat[4*3 + 0]<<" "<<viewMat[4*3+1]<<" "<<viewMat[4*3+2]<<" "<<viewMat[4*3+3] << endl;
|
||||
*/
|
||||
|
||||
B3_PROFILE("m_instancingRenderer render");
|
||||
m_data->m_instancingRenderer->writeTransforms();
|
||||
|
||||
Reference in New Issue
Block a user