Only generate VBO, if the glGenBuffers has been resolved
BUG: 246194 svn path=/trunk/KDE/kdebase/workspace/; revision=1157460
This commit is contained in:
parent
f5d46476aa
commit
a9e31c66bf
1 changed files with 8 additions and 2 deletions
|
@ -1082,13 +1082,19 @@ class GLVertexBufferPrivate
|
||||||
: hint( usageHint )
|
: hint( usageHint )
|
||||||
, numberVertices( 0 )
|
, numberVertices( 0 )
|
||||||
, dimension( 2 )
|
, dimension( 2 )
|
||||||
|
{
|
||||||
|
if( GLVertexBufferPrivate::supported )
|
||||||
{
|
{
|
||||||
glGenBuffers( 2, buffers );
|
glGenBuffers( 2, buffers );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
~GLVertexBufferPrivate()
|
~GLVertexBufferPrivate()
|
||||||
|
{
|
||||||
|
if( GLVertexBufferPrivate::supported )
|
||||||
{
|
{
|
||||||
glDeleteBuffers( 2, buffers );
|
glDeleteBuffers( 2, buffers );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
GLVertexBuffer::UsageHint hint;
|
GLVertexBuffer::UsageHint hint;
|
||||||
GLuint buffers[2];
|
GLuint buffers[2];
|
||||||
int numberVertices;
|
int numberVertices;
|
||||||
|
|
Loading…
Reference in a new issue