Hi Guys, I've been on holiday during this thread, so now just catching up... some brief thoughts on some of the points raised.
First up, modelview and projection matrices are something that the OSG can pass to GL3/OpenGLES2 by assigning a standard uniform to each of these matrices and then having osg::State::applyModelViewMatrix(RefMatrix*) and osg::State::applyProjectionMatrix(RefMatrix*) set these uniforms automatically. This will isolate the required changes to just osg::State. I'd suggest that these uniforms target the standard gl_ProjectionMatrix and gl_ModelViewMatrix uniform names for consistency with GL2. Need for the inverse versions and combinations could also be supported via osg::State. One in theory could name the projection and modelview matrices anything you want but personally I think it would be good to stick with a standard naming to avoid confusion and the need for extra API to set them consistently. On the topic of Fixed Function Pipeline fallback such as osg::Fog etc., in the first pass I think we should drop all this state support for the initial GL3 port, and have converters like the ShaderGen visitor map the FFP state attributes to shaders. The class like osg::Fog would effectively just become GL non ops, with their osg::StateAttribute::apply() method doing nothing, they would however still store their data so readers/writers could still load data, and apps would still compile - these loaded scene graph with the GL non op attributes in wouldn't work properly for rendering but would leave the door open to conversion to shaders at runtime. Later down the line once we have runtime shader composition working we can map the likes of osg::Fog etc to uniforms and associated shaders that we can use to compose the final program required by GL3. Once we get to this stage StateAttributes will effectively become containers for uniforms, and the old fixed function GL modes would become toggles for different shaders to be linked into the shader main. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

