Hi Robert,

An invalid enumerant is reported when some state that is being passed
to OpenGL is invalid, possibly in general or perhaps relating to that
specific hardware not being supported.

As to what is causing this error I can't say, there are many unkowns
involved given a simple email report about a application.  The best
way forward would be to try to track down what is causing the invalid
state at your end.  The OSG can help you in this respect by upping how
often OpenGL errors are checked for - by default this is once per
frame, done inside RenderStage.

You can hack the OSG to do this by modifying the following lines in
the src/osg/State.cpp State::State constructor:

#if 1
    _checkGLErrors = ONCE_PER_FRAME;
#else
    _checkGLErrors = ONCE_PER_ATTRIBUTE;
#endif


Just enable ONCE_PER_ATTRIBUTE.  A less intrusive way to do this is to
get the osg::State object from the Camera's GraphicsContext i.e.

  
viewer.getCamera()->getGraphicsContext()->getState()->etCheckForGLErrors(osg::State::ONCE_PER_ATTRIBUTE);

As for window minimization issues, this is something that is windowing
dependent.  I don't recall having done any work personally on
explicitly handling window minimization, the app should be getting the
events though so an event handler in the view could probably be used
to switch off the rendering frame loop while the window is minimized.

Robert.


On Nov 16, 2007 5:51 PM, Robert Balfour <[EMAIL PROTECTED]> wrote:
> Three points of question:
>
> 1.  When running the simple osgViewer app (OSG 2.2.0) I consistantly see
> this message during startup:
> Warning: detected OpenGL error 'invalid enumerant' after
> RenderBin::draw(,)
> Both my installs of OSG 2.2.0 have this symptom with osgViewer app.  Is
> there something I can do to overcome this warning?
>
> 2. In my custom OSG app (using osgViewer class), I use a custom drawable
> to do some 2D HUD OGL drawing, which is working great.  BUT, when I
> minimize the app window I get a continuous sequence of:
> Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,)
> This warning stops when I re-open the window from the taskbar.  Would
> someone have an idea of what causes this only when minimized?
>
> Which also begs the question:
>
> 3. When you minimize the app window, is OSG still drawing?  If so, as it
> appears, what would be an effective approach to disable unnecessary
> scenegraph drawing while the window is minimized? In osgGA I see window
> quit, resize, close events, but no minimize (although I do see a
> resize(1,1) event when minimized, which you could key off of).
>
> Thank you.
>
> Bob.
> --
> Robert E. Balfour, Ph.D.
> Exec. V.P. & CTO,  BALFOUR Technologies LLC
> 960 South Broadway, Suite 108, Hicksville NY 11801
> Phone: (516)513-0030  Fax: (516)513-0027  email: [EMAIL PROTECTED]
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to