[osg-users] Shaders with multiple views, possible?

Robert Osfield robert.osfield at gmail.com
Mon Jan 22 06:05:38 PST 2018


On 22 January 2018 at 13:58, Sebastian Messerschmidt
<sebastian.messerschmidt at gmx.de> wrote:
> the gl_ built-ins are not part of the core-profile and thus are not
> available in every version of GLSL.

I'll add that osg_ModelViewMatrix etc. are designed as fallbacks when
the gl_ versions aren't provided by GL-core profile and GLES2 - GLES3,

If your are just using the default GL2 profile you can happily just
use gl_ versions.  If you want to write shader code portable between
GL and GLES or beween GL and GL core profile then using the osg_
variants and telling the OSG to use these instead is done via
osg::State::set*() methods as shown in the osgsimplegl3 example.

Robert.


More information about the osg-users mailing list