Hi,

I'm trying to query GL parameters such as GL_VENDOR, which require an active 
graphics context to work.  I looked another thread on this forum which explains 
how to do it, but it only works for a single-threaded viewer.  I'm running the 
viewer in multithreaded mode, and am getting crashes due to context issues.  
Does anyone have an idea on how to do this?
Thanks

Example code.  Usually crashes at the makeCurrent() line:

Code:

//get renderer information
osgViewer::ViewerBase::Contexts contexts;
viewer->getContexts(contexts, true);
contexts[0]->makeCurrent();
std::string vendor = (const char*)glGetString(GL_VENDOR);
Report("Vendor: " + vendor);
contexts[0]->releaseContext();




Ryan

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74276#74276





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to