Hi Hartwig,

On 8 March 2015 at 23:10, Hartwig Wiesmann <hartwig.wiesm...@skywind.eu>
wrote:

> when running "simpleExample" on iOS I get shader errors because on GLES
> variables like gl_Vertex, gl_LightSource etc. are undefined. Or?
>

I don't know which example you are referring to as there isn't one
specifically called "simpleExample".

All I can say is that the gl_ inbuilt uniform shaders are from GL2 era
shaders, these can be automatically reassigned by the OSG at runtime by
tell the osg::State object for the graphics context to alias the built ins
to osg_ equivlants, the way to do it is illustrated in the osgsimplegl3
example:

     // for non GL3/GL4 and non GLES2 platforms we need enable the osg_
uniforms that the shaders will use,
    // you don't need thse two lines on GL3/GL4 and GLES2 specific builds
as these will be enable by default.
    gc->getState()->setUseModelViewAndProjectionUniforms(true);
    gc->getState()->setUseVertexAttributeAliasing(true);

Could you add similar code the example that you are trying and see if this
works.  If so copying the code from osgsimplegl3 is likely the best way
forward.

Robert,
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to