Hi You should read gles2 spec if you'll make apps running with it. There are no builtins gl_FrontColor and gl_Color in gles 2. Use your own varyings.
Cheers. 05.06.2012, 00:49, "Preet" <[email protected]>: > Hiya, > > I managed to compile and deploy a small OSG test application on the > Playbook, but have run into some trouble getting it to work correctly. > I'm not creating my own context or windowing system; instead I'm using > osg's GraphicsWindowEmbedded with Qt. As a test, I set up a scene with > a rotating cube. The application seems to display the viewport > (there's the telltale purple-blue background in OSG), but fails to > render the cube. > > The output seems to indicate that creating a shader for the cube > fails, but I can't discern any more than that. It feels like this has > something to do with OpenGL ES2... I compiled OSG for ES2 based on the > instructions I found on the mailing list and the OSG website. I've > pasted the output I think is relevant below, with the full output > here: (http://pastie.org/4027605), and the OSG scene set up here: > (http://pastie.org/4027631). The application works fine and renders as > expected using OpenGL on my desktop. Could anyone suggest something to > get this working? > > Preet > > glVersion=2, isGlslSupported=YES, glslLanguageVersion=1.016 > State::convertShaderSourceToOsgBuiltIns() > ++Before Converted source > > void main() > { > gl_Position = ftransform(); > gl_FrontColor = gl_Color; > } > > ++++++++ > -------- Converted source > uniform mat4 osg_ModelViewProjectionMatrix; > attribute vec4 osg_Color; > attribute vec4 osg_Vertex; > > void main() > { > gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex; > gl_FrontColor = osg_Color; > } > > ---------------- > > Compiling VERTEX source: > 1: uniform mat4 osg_ModelViewProjectionMatrix; > 2: attribute vec4 osg_Color; > 3: attribute vec4 osg_Vertex; > 4: > 5: void main() > 6: { > 7: gl_Position = osg_ModelViewProjectionMatrix * oVERTEX > glCompileShader "" FAILED > VERTEX Shader "" infolog: > 0:8(16): error: `gl_FrontColor' undeclared > 0:8(16): error: type mismatch > > FRAGMENT glCompileShader "" FAILED > FRAGMENT Shader "" infolog: > 0:6(19): error: `gl_Color' undeclared > 0:6(19): error: Operands to arithmetic operators must be numeric > 0:6(19): error: type mismatch > > glLinkProgram "" FAILED > Program "" infolog: > linking with uncompiled shaderlinking with uncompiled shader > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

