Hi Alok, On Thu, Dec 10, 2009 at 10:02 PM, Alok Priyadarshi <[email protected]> wrote: > I have not had any luck with this yet. I am trying to test ES 2.0 by > just disabling the fixed function pipeline... > > I tried osggeometry example. I do not see anything render - just > warnings about polygon stipple.
This is to be expected as the osggeometry example uses the fixed function pipeline, and you've disabled this path ;-) >From my earlier email on this topic: > Please note that most OSG examples won't work as is under OpenGLES 2.0 > thanks to the lack of the fixed function pipeline. This means you > need to code up vertex and fragment shaders to replace the fixed > function pipeline. You can use the osgUtil::ShaderGen to help do some > automatic conversions of fixed function pipeline scene graphs to > shader based ones but it's far from a perfect mapping. For my own testing during the GLES port I wrote a test example callled osgvertexattributes. This example loads a model then runs osgUtil::ShaderGen on it to convert the fixed function pipeline to shaders, and with sets the options in osg::State that tell it remap the traditional vertex arrays like VertexArrays/ColorArrays/NormalArrays to vertex attrib equivalents, and to turn on the adaption of shader programs to avoid using the GL2 style builtins, instead substituting in OSG equivalent builtins - such as for the modelview + projections matrices. So try: osgvertexattributes glider.osg When build for GLES2 I've set osgViewer::Viewer::setSceneData() to run ShaderGen automatically so it can actually get by a little better than when using the Config settings to disable fixed function features under GL2. So have a try with osgvertexattributes and see how you get on. It won't be perfect, as osgUtil::ShaderGen does convert the full fixed function pipeline but it should at least get you something on screen. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

