Hi,
According to the 3.0 release notes, OSG "introduces support for OpenGL ES 1.1,
OpenGL ES 2.0".
I'm using OSG 3.1.1, and I have built an application which works fine when I
compile OSG to use OpenGL. It's a pretty simple app that reads in a textured
3DS model and displays it.
However, when I recompile OSG to use OpenGL ES2.0, the same application doesn't
work so well. For example, the statistics text that appears from the
osgViewer::StatsHandler does not appear at all, and I get lots of messages such
as:
Warning: detected OpenGL error 'invalid enumerant' after applying GLMode 0x4000
Warning: Light::apply(State&) - not supported
Warning: Material::apply(State&) - not supported
Warning: TexEnvCombine::apply(State&) - not supported
Warning: TexGen::apply(State&) - not supported
Warning: TexMat::apply(State&) - not supported
I've tried using the default OSG shaders and my own custom ones, but I get the
same issues.
For reference, my (simple) shaders are:
Code:
varying mediump vec4 col;
varying mediump vec2 texcoord;
uniform mat4 osg_ModelViewProjectionMatrix;
attribute vec4 osg_MultiTexCoord0;
attribute vec4 osg_Color;
attribute vec4 osg_Vertex;
void main() {
gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex;
texcoord = osg_MultiTexCoord0.st;
col = osg_Color;
}
and
Code:
varying mediump vec4 col;
varying mediump vec2 texcoord;
uniform sampler2D diffuseMap;
void main()
{
vec4 base = texture2D(diffuseMap, texcoord);
vec4 color = base;
color *= col;
gl_FragColor = color;
}
When I search the forums, I see lots of posts where people faced similar
problems. But it's unclear how many of these problems have been 'fixed' in the
main OSG code now.
So my question is: does the latest OSG (3.1.1) work with GLES2.0 or not?
If it doesn't work 'out of the box', is there a document or example anywhere
that shows how to display a 3ds model in ES2.0?
Thank you!
Cheers,
Paul
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=51768#51768
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org