[osg-users] OSG in Gtk3 GLArea

Robert Osfield robert.osfield at gmail.com
Mon Jun 4 12:16:14 PDT 2018


Hi SJH,

On 4 June 2018 at 20:00, Mean Taipan <osgforum at tevs.eu> wrote:
> Again, my apologies but I can't delete this account.  Moderators, please do it ASAP, no problem for me.  (I won't try creating a new account until then, since I need to use the same email).

I can't help with this myself as I'm the admin of the mailing list,
the forum is a community effort where the original creator has now
moved on.  I am looking to move away, ideally we'll have one tool for
both mailing list and forun.  On the short list is simply using the
openscengraph googlegroups, alas I'm waiting on the person who set
this up to transfer ownership and so far gone awol...  I can only
really control what I have direct control over.

> But in the meantime, if you'll bear with me, I recompiled osg with -DOPENGL_PROFILE=GLCORE but it triggers
>
>
> Code:
> Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)

Your scene graph probably is using fixed function state of some kind
that is triggering the error. Using GL Core Profile is not a small
step, it requires all your fixed function state to be replaced by
shaders.  Many users have taken this step - it's essential for GLES2,
but most will stick with the GL2 profile and have backwards
compatibility.  Sometimes applications can be moved across easily,
others it far more difficult.  I don't know anything about your
application/graphics usage so can't say where you might fit on the
spectrum.

There has been lots of discussion about this topic so I won't go into
that here, just have a search through the archives.

> if there is any geometry.  Vastly fewer errors than before, in fact only one, but still a black screen.  So I'm probably missing something.  The sequence of events is:
>
> - when constructing the Viewer subclass, when the window is realized, it calls setUpViewerAsEmbeddedInWindow().
> - when it is time to render, Gtk has already made the GL context 'current', so the draw callback just calls Viewer::frame().
>
> So, if it's not too much trouble, someone please point out how I can get some finer debug granularity so I can chase down the error myself, or advise on what needs to precede the frame() call.

You can get the OSG to report GL errors more fine grained by setting
the OSG_GL_ERROR_CHECKING env var to ON.  To list all the env vars run
:

  osgviewer --help-env

Robert


More information about the osg-users mailing list