Re: [osg-users] Bug in GLObjectsVisitor::apply(osg::Geode node)

2011-02-07 Thread Robert Osfield
Hi Felix,

Something odd must be going on with the scene graph should be
independent from any state, there should be no reason that state
should be applied before geometry calls.  If there is a problem then
changing the order is probably just masking the issue.

Could you explain the role of invalid vertex program?

Robert.

On Sun, Feb 6, 2011 at 2:09 PM, Felix Nawothnig
felix.nawoth...@googlemail.com wrote:
 Hello.

 I was getting GL_INVALID_OPERATION on a glDrawArrays() call in
 Drawable::compileGLObjects() / Geometry::drawImplementation(). I
 traced it down to GLObjectsVisitor::apply(osg::Geode node) which
 does:

           apply(*drawable);
           if (drawable-getStateSet())
           {
               apply(*(drawable-getStateSet()));
           }

 ... so because the drawable is drawn before it's stateset was applied
 an invalid vertex program was used (which caused the
 GL_INVALID_OPERATION error). Changing the order there fixed the
 problem for me.

 I checked trunk - the problem is still there.

 Cheers,

 Felix
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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


[osg-users] Bug in GLObjectsVisitor::apply(osg::Geode node)

2011-02-06 Thread Felix Nawothnig
Hello.

I was getting GL_INVALID_OPERATION on a glDrawArrays() call in
Drawable::compileGLObjects() / Geometry::drawImplementation(). I
traced it down to GLObjectsVisitor::apply(osg::Geode node) which
does:

   apply(*drawable);
   if (drawable-getStateSet())
   {
   apply(*(drawable-getStateSet()));
   }

... so because the drawable is drawn before it's stateset was applied
an invalid vertex program was used (which caused the
GL_INVALID_OPERATION error). Changing the order there fixed the
problem for me.

I checked trunk - the problem is still there.

Cheers,

Felix
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org