Hi,
I try using OpenGLES2.0. All went fine. A simple program with shaders work also
fine. But another example don't. The vertex and fragment shader fail at
compiling. This is the log:
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 * osg_Vertex;
8: gl_FrontColor = osg_Color;
9: }
VERTEX glCompileShader "" FAILED
VERTEX Shader "" infolog:
ERROR: 0:8: 'gl_FrontColor' : undeclared identifier
ERROR: 0:8: 'assign' : cannot convert from 'attribute 4-component vector of
highp float' to 'float'
Compiling FRAGMENT source:
1:
2: void main()
3: {
4: vec4 base = vec4(1.0);
5: vec4 color = base;
6: color *= gl_Color;
7: gl_FragColor = color;
8: }
FRAGMENT glCompileShader "" FAILED
FRAGMENT Shader "" infolog:
ERROR: 0:4: '4-component vector of float' : declaration must include a
precision qualifier for type
ERROR: 0:5: '4-component vector of float' : declaration must include a
precision qualifier for type
ERROR: 0:6: 'gl_Color' : undeclared identifier
Another error is:
Could not find plugin to read objects from file "file.osgt".
Have an idea what are the problems?
It seems that the shader don't know gl_Color or gl_FrontColor
Thank you!
Cheers,
Tobias
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=42596#42596
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org