From ed35a0a07a0dad37393f4ad8a001b28facdc3cb7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 21 Mar 2013 16:22:30 +0000 Subject: [PATCH] Added check against isVertexBufferObjectSupported() in set*Pointer() methods --- include/osg/State | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/osg/State b/include/osg/State index df55037e3..dc9c5c267 100644 --- a/include/osg/State +++ b/include/osg/State @@ -614,7 +614,7 @@ class OSG_EXPORT State : public Referenced, public Observer { if (array) { - GLBufferObject* vbo = array->getOrCreateGLBufferObject(_contextID); + GLBufferObject* vbo = isVertexBufferObjectSupported() ? array->getOrCreateGLBufferObject(_contextID) : 0; if (vbo) { bindVertexBufferObject(vbo); @@ -705,7 +705,7 @@ class OSG_EXPORT State : public Referenced, public Observer { if (array) { - GLBufferObject* vbo = array->getOrCreateGLBufferObject(_contextID); + GLBufferObject* vbo = isVertexBufferObjectSupported() ? array->getOrCreateGLBufferObject(_contextID) : 0; if (vbo) { bindVertexBufferObject(vbo); @@ -795,7 +795,7 @@ class OSG_EXPORT State : public Referenced, public Observer { if (array) { - GLBufferObject* vbo = array->getOrCreateGLBufferObject(_contextID); + GLBufferObject* vbo = isVertexBufferObjectSupported() ? array->getOrCreateGLBufferObject(_contextID) : 0; if (vbo) { bindVertexBufferObject(vbo); @@ -890,7 +890,7 @@ class OSG_EXPORT State : public Referenced, public Observer { if (array) { - GLBufferObject* vbo = array->getOrCreateGLBufferObject(_contextID); + GLBufferObject* vbo = isVertexBufferObjectSupported() ? array->getOrCreateGLBufferObject(_contextID) : 0; if (vbo) { bindVertexBufferObject(vbo); @@ -957,7 +957,7 @@ class OSG_EXPORT State : public Referenced, public Observer { if (array) { - GLBufferObject* vbo = array->getOrCreateGLBufferObject(_contextID); + GLBufferObject* vbo = isVertexBufferObjectSupported() ? array->getOrCreateGLBufferObject(_contextID) : 0; if (vbo) { bindVertexBufferObject(vbo); @@ -1024,7 +1024,7 @@ class OSG_EXPORT State : public Referenced, public Observer { if (array) { - GLBufferObject* vbo = array->getOrCreateGLBufferObject(_contextID); + GLBufferObject* vbo = isVertexBufferObjectSupported() ? array->getOrCreateGLBufferObject(_contextID) : 0; if (vbo) { bindVertexBufferObject(vbo); @@ -1199,7 +1199,7 @@ class OSG_EXPORT State : public Referenced, public Observer { if (array) { - GLBufferObject* vbo = array->getOrCreateGLBufferObject(_contextID); + GLBufferObject* vbo = isVertexBufferObjectSupported() ? array->getOrCreateGLBufferObject(_contextID) : 0; if (vbo) { bindVertexBufferObject(vbo);