From fa11d7b6fab0aadd082c5c0d0136d18733475e40 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 24 May 2011 10:13:07 +0000 Subject: [PATCH] Fixed Coverity issue. CID 11691: Uninitialized scalar field (UNINIT_CTOR) Non-static class member _isPBOSupported is not initialized in this constructor nor in any functions that it calls. Non-static class member _isUniformBufferObjectSupported is not initialized in this constructor nor in any functions that it calls. --- src/osg/BufferObject.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/osg/BufferObject.cpp b/src/osg/BufferObject.cpp index e191906a1..1bcf682da 100644 --- a/src/osg/BufferObject.cpp +++ b/src/osg/BufferObject.cpp @@ -277,6 +277,9 @@ void GLBufferObject::Extensions::lowestCommonDenominator(const Extensions& rhs) if (!rhs._glGetBufferParameteriv) _glGetBufferPointerv = rhs._glGetBufferPointerv; if (!rhs._glBindBufferRange) _glBindBufferRange = rhs._glBindBufferRange; if (!rhs._glBindBufferBase) _glBindBufferBase = rhs._glBindBufferBase; + + _isPBOSupported = rhs._isPBOSupported; + _isUniformBufferObjectSupported = rhs._isUniformBufferObjectSupported; } void GLBufferObject::Extensions::setupGLExtensions(unsigned int contextID) @@ -292,11 +295,11 @@ void GLBufferObject::Extensions::setupGLExtensions(unsigned int contextID) setGLExtensionFuncPtr(_glUnmapBuffer, "glUnmapBuffer","glUnmapBufferARB"); setGLExtensionFuncPtr(_glGetBufferParameteriv, "glGetBufferParameteriv","glGetBufferParameterivARB"); setGLExtensionFuncPtr(_glGetBufferPointerv, "glGetBufferPointerv","glGetBufferPointervARB"); - _isPBOSupported = OSG_GL3_FEATURES || osg::isGLExtensionSupported(contextID,"GL_ARB_pixel_buffer_object"); setGLExtensionFuncPtr(_glBindBufferRange, "glBindBufferRange"); setGLExtensionFuncPtr(_glBindBufferBase, "glBindBufferBase"); - _isUniformBufferObjectSupported - = osg::isGLExtensionSupported(contextID, "GL_ARB_uniform_buffer_object"); + + _isPBOSupported = OSG_GL3_FEATURES || osg::isGLExtensionSupported(contextID,"GL_ARB_pixel_buffer_object"); + _isUniformBufferObjectSupported = osg::isGLExtensionSupported(contextID, "GL_ARB_uniform_buffer_object"); } void GLBufferObject::Extensions::glGenBuffers(GLsizei n, GLuint *buffers) const