HI Robert,

On Fri, Aug 27, 2010 at 3:50 PM, Robert Timm <[email protected]> wrote:
> Ok, to keep this up to date, I managed to render a textured model using 
> OpenGL ES 2.0 on the IPhone.

Horay!! ;-)


> But I am not sure whether this is the way to go...

With shaders there are a 101 ways to go :-)


> Using this code I get a textured model with some basic shading. But is this 
> really the way to go? It feels so "manual". But what ShaderGen does for 
> OpenGL ES 2.0 does not work at all (does not compile due to usage of 
> undefined variable names). Any hints or suggestions are very welcome!

ShaderGen was written for GL2 so uses GL2 GLSL variables that aren't
available.  I've added some remapping of variables in osg::State to
handle the most common ones but in the end it's only a temporary work
around.  ShaderGen itself is also just a temporary solution.

ShaderComposition will the final solution, but this is still in
development so for now you'll have to write all the shaders yourself.


> Furthermore I get tons of messages like:
> Code:
> Warning: detected OpenGL error GL_INVALID_ENUM after applying GLMode 0xba1
> Warning: Material::apply(State&) - not supported.
> Warning: detected OpenGL error GL_INVALID_ENUM after applying GLMode 0xde1
> Warning: detected OpenGL error GL_INVALID_ENUM after applying GLMode 0xb50
>
>
> Those modes correspond to GL_NORMALIZE, GL_TEXTURE_2D and GL_LIGHTING. Why 
> does OSG still use them even it is compiled in OpenGL ES 2.0 mode? Am I doing 
> something wrong? Or is it just work in progress?

The OSG just passes OpenGL modes directly on to OpenGL/OpenGL ES
making the assumption that you know what you are doing and the state
you've set up in the scene graph is correct for your target.  In your
case you just need to remove these problem modes.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to