> I completed osgAndroid Example with GLES1 successfully. If I try to run
> the same example with OpenGLES2 then the OSG model is not rendering. If I
> add the following code then I am able to see the model on my device.
>

  This is normal.


> 1) Why should I add the shaders in OpenGLES2 to display model.Can't I
> display the model with out this Shaders code. OpenGLES1 example doesn’t
> have this shaders.
>

  No. OpenGL ES2 is not like regular OpenGL. ES2 does NOT have the fixed
functionality available that ES1 has. You can have shaders OR fixed
function, but not both.


> 2) If I add the shaders then the fixed functionalities like textures,
> lighting etc. were disabled. But I need to enable them because I got model
> from 3DS MAX. How can I enable fixed functionalities?
>

  You can not. You need to write shaders that provide that same
functionality.


> Can you please guide me how to enable fixed functionalities? If shaders
> are necessary to render model on Android with OpenGLES2 then how can I
> handle textures (or any others fixed functionalities) ? Is there any
> tutorial to handle this in Android?
>

  One way to do this is to use a shader generator to create a shader to
implement some of the fixed function capability in a shader. OSG has a
ShaderGen tool, but it's somewhat out of date with regard to OpenGL ES2.
We've been using an updated version of it, but it's not in core OSG yet.

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
@alphapixel <https://twitter.com/alphapixel> facebook.com/alphapixel
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to