Robert,
 
Thanks for the quick reply.  I'll explore the options you mentioned.
 
-- Dan


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield
Sent: Tuesday, October 03, 2006 12:25 PM
To: osg users
Subject: Re: [osg-users] Proper way to tell if shaders are supported / failedto load

Hi Dan,

Checking for extensions is relatively straight forward, your can do it by querring OpenGL itself, or by using the OSG extension structure that you'll find in each of the StateAttribute that implementats some form of extension.  I'd do this checking just after you've created the graphics context but before you go ahead and set up your scene graph.

Checking for failure to load a shader is bit more awkward you can do drawing and then check the logs, but this is possibly too late, you've already configured your scene graph.  Perhaps setting up shaders, doing a compile of each of them,  checking of any  error  reports would be the way.

Robert.

On 10/3/06, Gilbert, Daniel R. <[EMAIL PROTECTED]> wrote:
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

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to