From Farshid Lashkari,

"I was experiencing hard crashes of my application when using PBO's on
machines that don't support PBO's. I think osg incorrectly checks if
PBO's are supported.

I added a new method to the BufferObject::Extensions class which
returns if the "GL_ARB_pixel_buffer_object" string is supported. This
fixes the problem on my end. Machines without PBO support will
continue to work and machines with PBO support will still be able to
use it."
This commit is contained in:
Robert Osfield
2006-08-25 08:48:16 +00:00
parent 8365ec3217
commit 0900857333
4 changed files with 9 additions and 5 deletions

View File

@@ -182,7 +182,7 @@ void BufferObject::Extensions::lowestCommonDenominator(const Extensions& rhs)
if (!rhs._glGetBufferParameteriv) _glGetBufferPointerv = rhs._glGetBufferPointerv;
}
void BufferObject::Extensions::setupGLExtenions(unsigned int)
void BufferObject::Extensions::setupGLExtenions(unsigned int contextID)
{
_glGenBuffers = ((GenBuffersProc)osg::getGLExtensionFuncPtr("glGenBuffers","glGenBuffersARB"));
_glBindBuffer = ((BindBufferProc)osg::getGLExtensionFuncPtr("glBindBuffer","glBindBufferARB"));
@@ -195,6 +195,7 @@ void BufferObject::Extensions::setupGLExtenions(unsigned int)
_glUnmapBuffer = ((UnmapBufferProc)osg::getGLExtensionFuncPtr("glUnmapBuffer","glUnmapBufferARB"));
_glGetBufferParameteriv = ((GetBufferParameterivProc)osg::getGLExtensionFuncPtr("glGetBufferParameteriv","glGetBufferParameterivARB"));
_glGetBufferPointerv = ((GetBufferPointervProc)osg::getGLExtensionFuncPtr("glGetBufferPointerv","glGetBufferPointervARB"));
_isPBOSupported = osg::isGLExtensionSupported(contextID,"GL_ARB_pixel_buffer_object");
}
void BufferObject::Extensions::glGenBuffers(GLsizei n, GLuint *buffers) const