Hi Mike,
The errors are obviously OpenGL ES related. IIRC there are no built-in
uniforms for material/lights. So maybe the ES path is not yet complete
regarding shaders.
Is the shader maybe inside your osgt file itself? I don't remember if
there is some kind of automagic shader generation to emulate fixed
function path ...
cheers
Sebastian
Hi
right got complete build, Xcode 4.6, SDK 6.1, OSG 3.2 branch (built with
OpenGLES 2.0 only). All links and runs, it loads .osgt files, but I get errors
at runtime when shaders get compiled (see below). I'm not adding the shaders,
it seems to be the default ones OSG adds. The code is basically the same as
osgviewerIPhone…
any ideas as to why it may not work?
Cheers,
Mike
Compiling VERTEX source:
1: uniform mat3 osg_NormalMatrix;
2: uniform mat4 osg_ModelViewProjectionMatrix;
3: uniform mat4 osg_ModelViewMatrix;
4: attribute vec3 osg_Normal;
5: attribute vec4 osg_Vertex;
6: varying vec3 normalDir;
7: varying vec3 lightDir;
8: varying vec3 viewDir;
9:
10: void main()
11: {
12: gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex;
13: normalDir = osg_NormalMatrix * osg_Normal;
14: vec3 dir = -vec3(osg_ModelViewMatrix * osg_Vertex);
15: viewDir = dir;
16: vec4 lpos = gl_LightSource[0].position;
17: if (lpos.w == 0.0)
18: lightDir = lpos.xyz;
19: else
20: lightDir = lpos.xyz + dir;
21: }
VERTEX glCompileShader "" FAILED
VERTEX Shader "" infolog:
ERROR: 0:16: Use of undeclared identifier 'gl_LightSource'
ERROR: 0:17: Use of undeclared identifier 'lpos'
ERROR: 0:18: Use of undeclared identifier 'lpos'
ERROR: 0:20: Use of undeclared identifier 'lpos'
On 9 Dec 2013, at 11:28, Mike Krus <[email protected]> wrote:
On 9 Dec 2013, at 10:52, Robert Osfield <[email protected]> wrote:
Does the OSG-3.2 branch compile with osgEarth? If so you could try this as it
contains a few of the build fixes that aren't in OSG-3.2.0.
I'll have to try. I'm building OSG 3.2.0 (tag)
Mike
_______________________________________________
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
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org