[osg-users] PolygonMode::FRONT / BACK causes Warning
Paul Martz
pmartz at skew-matrix.com
Wed Jul 23 07:34:09 PDT 2008
Looks like uninitialized variables in the constructor to me:
PolygonMode(Face face,Mode mode) { setMode(face,mode); }
If you specify FRONT in the constructor, the back mode never gets
initialized. You should fix this and post your change to osg-submissions.
-Paul
>
> Hello,
>
> I am testing some Code and trying to look at some Wireframe
> Models, I use the following line of code, first using
> FRONT_AND_BACK PolygonMode
>
> osg::PolygonMode * pm = new
> osg::PolygonMode(osg::PolygonMode::FRONT_AND_BACK,
> osg::PolygonMode::LINE);
>
> That works, both sides are rendered as wireframe, but then I
> tried to use FRONT or BACK only with
>
> osg::PolygonMode * pm = new osg::PolygonMode(osg::PolygonMode::FRONT,
> osg::PolygonMode::LINE);
> osg::PolygonMode * pm = new osg::PolygonMode(osg::PolygonMode::BACK,
> osg::PolygonMode::LINE);
> These are the valid modes I found in the documentation and
> they work, I see either only Front as Wireframe or the Back.
>
> But my console window is flooded with following warning:
> "Warning: detected OpenGL error 'invalid enumerant' after
> RenderBin::draw(,)"
>
> Where is the problem here?
>
> Greets
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
negraph.org
More information about the osg-users
mailing list