From e3df1e954d8c4b36eeae9d28b06e4f40c2c6ed18 Mon Sep 17 00:00:00 2001 From: "Konstantin S. Matveyev" Date: Thu, 22 Feb 2018 16:41:46 +0300 Subject: [PATCH 1/2] GLExtensions fix: No PBO on GLES2 by default --- src/osg/GLExtensions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osg/GLExtensions.cpp b/src/osg/GLExtensions.cpp index 345b0fb3a..7b81b5398 100644 --- a/src/osg/GLExtensions.cpp +++ b/src/osg/GLExtensions.cpp @@ -736,7 +736,7 @@ GLExtensions::GLExtensions(unsigned int in_contextID): setGLExtensionFuncPtr(glTexBuffer, "glTexBuffer","glTexBufferARB" , validContext); isVBOSupported = validContext && (OSG_GLES2_FEATURES || OSG_GLES3_FEATURES || OSG_GL3_FEATURES || osg::isGLExtensionSupported(contextID,"GL_ARB_vertex_buffer_object")); - isPBOSupported = validContext && (OSG_GLES2_FEATURES || OSG_GLES3_FEATURES || OSG_GL3_FEATURES || osg::isGLExtensionSupported(contextID,"GL_ARB_pixel_buffer_object")); + isPBOSupported = validContext && (OSG_GLES3_FEATURES || OSG_GL3_FEATURES || osg::isGLExtensionSupported(contextID,"GL_ARB_pixel_buffer_object")); isTBOSupported = validContext && osg::isGLExtensionSupported(contextID,"GL_ARB_texture_buffer_object"); isVAOSupported = validContext && (OSG_GLES3_FEATURES || OSG_GL3_FEATURES || osg::isGLExtensionSupported(contextID, "GL_ARB_vertex_array_object", "GL_OES_vertex_array_object")); isTransformFeedbackSupported = validContext && osg::isGLExtensionSupported(contextID, "GL_ARB_transform_feedback2"); From 2b13166c8d75a47a7b42acf70b306f3ed3c12c86 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 23 Feb 2018 09:55:00 +0000 Subject: [PATCH 2/2] Cleaned up the applying of the glDrawBuffers() --- src/osgUtil/RenderStage.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/osgUtil/RenderStage.cpp b/src/osgUtil/RenderStage.cpp index 26a4eb184..539bae62a 100644 --- a/src/osgUtil/RenderStage.cpp +++ b/src/osgUtil/RenderStage.cpp @@ -517,12 +517,12 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) // and before call to glCheckFramebufferStatus if ( !colorAttached ) { - setDrawBuffer( GL_NONE, true ); - setReadBuffer( GL_NONE, true ); - #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE) - glDrawBuffer( GL_NONE ); - glReadBuffer( GL_NONE ); - #endif + #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE) + setDrawBuffer( GL_NONE, false ); + setReadBuffer( GL_NONE, false ); + glDrawBuffer( GL_NONE ); + glReadBuffer( GL_NONE ); + #endif } GLenum status = ext->glCheckFramebufferStatus(GL_FRAMEBUFFER_EXT);