Commit 1804f72d authored by IOhannes m zmölnig's avatar IOhannes m zmölnig
Browse files

protext VertexBuffer from being called in incompatible OpenGL contexts

parent bc519498
......@@ -102,6 +102,7 @@ void gem::VertexBuffer:: resize (unsigned int size_)
bool gem::VertexBuffer:: create (void)
{
if(!(glGenBuffers && glBufferData && glBindBuffer)) return false;
if(!vbo) {
glGenBuffers(1, &vbo);
}
......@@ -114,6 +115,7 @@ bool gem::VertexBuffer:: create (void)
}
bool gem::VertexBuffer:: render (void)
{
if(!(glBufferData && glBindBuffer)) return false;
// render from the VBO
//::post("VertexBuffer::render: %d?", enabled);
if ( enabled ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment