[osg-users] Modern GLSL and OSG

Garth D garthy_gso at entropicsoftware.com
Tue Sep 29 01:00:26 PDT 2015


Hi Jan,

On 28/09/15 17:36, Jan Ciger wrote:
> On Sun, Sep 27, 2015 at 9:28 PM, Garth D
> <garthy_gso at entropicsoftware.com> wrote:
>> As a side note, I have to say that I am really liking the ability to hang
>> Uniforms off arbitrary parts of the scene graph- generally on Geometry or
>> Groups depending on the scope that I need the Uniform to cover. It's really
>> a very nice design.
>
>
> Uniforms are parts of the OpenGL state, same as e.g. bound textures,
> shaders or lighting settings. If I grossly simplify things, the "only"
> thing that OSG does is to manage this state for you - adds and removes
> bits from the state depending on which part of the scene graph is
> being drawn, all the while to make sure to minimize the amount of
> these state changes (changing state of the driver is relative
> expensive operation). It is one of the basic purposes of a scene
> graph.

In the project I am working on the geometry is laid out in such a way 
that there are different levels of Groups under which certain Uniforms 
always hold the same value. It works really nicely with such a system.

Cheers,
Garth




More information about the osg-users mailing list