Only generate VBO, if the glGenBuffers has been resolved

BUG: 246194

svn path=/trunk/KDE/kdebase/workspace/; revision=1157460
This commit is contained in:
Martin Gräßlin 2010-07-31 05:48:27 +00:00
parent f5d46476aa
commit a9e31c66bf

View file

@ -1083,11 +1083,17 @@ class GLVertexBufferPrivate
, numberVertices( 0 ) , numberVertices( 0 )
, dimension( 2 ) , dimension( 2 )
{ {
glGenBuffers( 2, buffers ); if( GLVertexBufferPrivate::supported )
{
glGenBuffers( 2, buffers );
}
} }
~GLVertexBufferPrivate() ~GLVertexBufferPrivate()
{ {
glDeleteBuffers( 2, buffers ); if( GLVertexBufferPrivate::supported )
{
glDeleteBuffers( 2, buffers );
}
} }
GLVertexBuffer::UsageHint hint; GLVertexBuffer::UsageHint hint;
GLuint buffers[2]; GLuint buffers[2];