Hi,
 
we had (again) a customer with an older Quadro graphics board which unfortunately does not even support vertex array objects. As there was no check for their support before calling the appropriate GL functions, I added 2 tests for their extension (GL_ARB_vertex_array_object) to make sure the application does not crash. Code it attached.
 
Regards,
Michael
@@ -653,6 +653,12 @@ UInt32 Geometry::handleVAOGL(DrawEnv                 *pEnv,
     Window           *pWin      = pEnv->getWindow();
     GLHandlerOptions  glOptions = { uiOptions };
 
+	if(!pWin->hasExtension("GL_ARB_vertex_array_object"))
+	{
+		SWARNING << "Geometry::handleAttDestroyGL: Extension: GL_ARB_vertex_array_object not supported!" << std::endl;
+		return 0;
+	}
+
     if(mode == Window::initialize || mode == Window::needrefresh ||
        mode == Window::reinitialize)
     {
@@ -721,6 +727,12 @@ void Geometry::handleVAODestroyGL(DrawEnv                 *pEnv,
     UInt32                   glid;
     Window                  *pWin = pEnv->getWindow();
 
+	if(!pWin->hasExtension("GL_ARB_vertex_array_object"))
+	{
+		SWARNING << "Geometry::handleAttDestroyGL: Extension: GL_ARB_vertex_array_object not supported!" << std::endl;
+		return;
+	}
+
     if(mode == Window::destroy)
     {
         OSGGETGLFUNCBYID_GL3_ES(glDeleteVertexArrays,
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to