[osg-users] Modern GLSL and OSG

Jan Ciger jan.ciger at gmail.com
Fri Sep 25 01:18:19 PDT 2015


On Fri, Sep 25, 2015 at 2:01 AM, Garth D
<garthy_gso at entropicsoftware.com> wrote:
> Thankyou for the suggestion. :)
>
> I have to admit being unsure how to set the specific context at present.
>
> From what I've read, there'd need to be a glXCreateContextAttribsARB call
> somewhere to create the GL3 context under Linux- and there doesn't seem to
> be one. Skimming the source (I'm presently using OSG 3.2.1, but had a peek
> at 3.4.0) suggests that perhaps this support is only available on a Windows
> build. On the cmake side, OSG_GL3_AVAILABLE in my build is off. However,
> glVersion=4.4 appears in my log during a build.

The cmake variables are meant to be set by the developer, see the
instructions here:

http://permalink.gmane.org/gmane.comp.graphics.openscenegraph.user/72253

It is possible that GL3 support is still available on Windows only,
but even if that is the case, it shouldn't be terribly difficult to
make it work in Linux too. The drivers and OpenGL implementations
certainly support it now.

> I'm beginning to suspect that aiming for strict OpenGL 3+ or 4+ might not be
> the best thing for me to concentrate at the moment. I might be better off
> just using it where it helps and leaving a jump to "pure" modern GL until a
> later date.

Well, it depends on what you want to do. Moving to the "modern" OpenGL
without the fixed pipeline functionality is a big jump, because
basically you don't have anything pre-defined by the library anymore.
No matrix stack (glPush/glPop), everything needs to be managed using
shaders, etc. The older functionality is easier to make display
something on the screen quickly, because there are fewer things to set
up. The newer stuff gives you much more flexibility, though. Using OSG
helps to hide this complexity, because OSG abstracts and manages many
of these things for you, regardless of which OpenGL profile are you
using.

J.



More information about the osg-users mailing list