Hi Joel,

On Sat, Oct 22, 2011 at 3:22 AM, Joel Graff <pair_o_gra...@comcast.net> wrote:
> Unless you're implying I grab the console output and parse it for tell-tale 
> signs of the shader error log to determine if the shader compiled  with 
> errors?

One normally develops the software and shaders together so during this
development you can do things that you wouldn't do when an application
is deployed to users - in this case outputting to console is a very
useful tool, and avoids the need for overly complicated "solutions" to
the problem of debugging shaders.

Now if you really really needed to detect shader problems on a per
shader basis then the best way would be to write a node visitor that
picked out all the osg::Program in the scene graph and the walked
through these in turn calling the StateSet::apply() or
Program::apply(..) and then looking at errors reported.  You can do
this all within a realize callback, a Camera pre draw callback, or a
osg::GraphicsOperation attached to the graphics context, lots of
different ways.

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

Reply via email to