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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user