On 8/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > There is a method for drawing object outlines in OpenGL by setting > backfacing polygons to be rendered with lines and overriding the backface > color to the desired outline color. I am trying to apply this method to > models loaded from a file into a scenegraph. The first step is easy > enough: obtain the model's StateSet and apply a PolygonMode( BACK, LINE ) > StateAttribute. However, I cannot find an obvious way to override the > polygon back face color, short of either directly editing the loaded model > file or applying a vertex and fragment shader. Is there something simple I > am missing?
Have a look at the osgscribe example. > Additionally, when the PolygonMode attribute is set as above, I see warning > messages as follows: > > Warning: detected OpenGL error 'invalid enumerant' after RenderBin::draw(,) > > Is there something I need to do to avoid this error? It doesn't seem to > adversely affect rendering. Well you could fix the invalid enumerant :-) It bascially means that some value you'e set on one of your StateAttribubtes is invalid. The OSG just passes these values on to OpenGL and generally doesn't catch errors, leaving this to OpenGL. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

