Hi Dan, Perhaps the following is what your are looking
for: osgUtil::SceneView *m_SceneView = new osgUtil::SceneView ; unsigned int contextID = m_SceneView
-> getState() -> getContextID() ; osg::GL2Extensions* gl2Ext =
osg::GL2Extensions::Get( contextID, true
) ; float glver =
gl2Ext -> getGlVersion() ; float langver =
gl2Ext -> getLanguageVersion() ; printf( "\nUsing OpenGL version %f lang ver: %f.\n",
glver, langver ) ; printf( "Shader support: Vertex: %s Frag: %s GLSL:
%s.\n\n", gl2Ext ->
isVertexShaderSupported() ? "yes"
: "no" , gl2Ext ->
isFragmentShaderSupported() ? "yes"
: "no", gl2Ext ->
isGlslSupported() ? "yes"
: "no" )
; Regards, Andy From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Gilbert, Daniel R. Hello All, I've recently added the use of vertex and fragment shaders
to our application, and things are working quite well. I now need to add
proper fallback logic in case a user's system cannot support
shaders, or if the shaders failed to load. Perhaps I've overlooked something, but none of the examples
which use shaders appear to perform any such checks. Does one have to
grab the InfoLog via getGlShaderInfoLog() and manually search for
"error"? I'm sure others have added similar checks in their
applications, so any advice would be greatly appreciated. Thanks in advance, -- Dan ________________________________________________________________________ This e-mail has been scanned for all viruses by Star.The service is powered by MessageLabs. ________________________________________________________________________ |
_______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/