Hi,
J.P. Delport wrote:
> Hi,
>
> sorry, I don't have any answers for you, but I have a Beagleboard that
> I've not booted in a while. What OpenGL drivers are you using?
>
I'm using the open source driver for SGX. But the differences are in the
GLES libraries not in the driver, as far as I know. For the libraries I
tried versions 3.00.00.06 and 3.00.00.09 from TI's Graphics SDK.
I will try to provide a log with higher notification level tonight (I
cannot do it now), but this is an example of the kind of errors produced.
Regards
david
--8<-------------------------------
++Before Converted source
varying vec3 normalDir;
varying vec3 lightDir;
varying vec3 viewDir;
void main()
{
gl_Position = ftransform();
gl_TexCoord[0] = gl_MultiTexCoord0;
normalDir = gl_NormalMatrix * gl_Normal;
vec3 dir = -vec3(gl_ModelViewMatrix * gl_Vertex);
viewDir = dir;
vec4 lpos = gl_LightSource[0].position;
if (lpos.w == 0.0)
lightDir = lpos.xyz;
else
lightDir = lpos.xyz + dir;
}
++++++++
-------- Converted source
uniform mat3 osg_NormalMatrix;
uniform mat4 osg_ModelViewProjectionMatrix;
uniform mat4 osg_ModelViewMatrix;
attribute vec4 osg_MultiTexCoord0;
attribute vec4 osg_Vertex;
attribute vec3 osg_Normal;
varying vec3 normalDir;
varying vec3 lightDir;
varying vec3 viewDir;
void main()
{
gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex;
gl_TexCoord[0] = osg_MultiTexCoord0;
normalDir = osg_NormalMatrix * osg_Normal;
vec3 dir = -vec3(osg_ModelViewMatrix * osg_Vertex);
viewDir = dir;
vec4 lpos = gl_LightSource[0].position;
if (lpos.w == 0.0)
lightDir = lpos.xyz;
else
lightDir = lpos.xyz + dir;
}
----------------
VERTEX glCompileShader "" FAILED
VERTEX Shader "" infolog:
Compile failed.
ERROR: 0:14: 'gl_TexCoord' : undeclared identifer
ERROR: 0:14: 'gl_TexCoord' : left of '[' is not of type array, matrix,
or vector
ERROR: 0:14: 'assign' : cannot convert from 'attribute 4-component
vector of float' to 'float'
ERROR: 0:18: 'gl_LightSource' : undeclared identifer
ERROR: 0:18: 'gl_LightSource' : left of '[' is not of type array,
matrix, or vector
ERROR: 0:18: 'position' : illegal vector field selection
ERROR: 0:18: 'assign' : cannot convert from 'float' to '4-component
vector of float'
ERROR: 7 compilation errors. No code generated.
FRAGMENT glCompileShader "" FAILED
FRAGMENT Shader "" infolog:
Compile failed.
ERROR: 0:1: 'vec3' : No precision defined for this type
ERROR: 0:2: 'vec3' : No precision defined for this type
ERROR: 0:3: 'vec3' : No precision defined for this type
ERROR: 0:8: 'vec4' : No precision defined for this type
ERROR: 0:8: 'gl_TexCoord' : undeclared identifer
ERROR: 0:8: 'gl_TexCoord' : left of '[' is not of type array, matrix, or
vector
ERROR: 0:8: 'st' : field selection requires structure or vector on left
hand side
ERROR: 0:8: 'texture2D' : no matching overloaded function found
ERROR: 0:8: 'assign' : cannot convert from 'float' to '4-component
vector of float'
ERROR: 0:9: 'vec3' : No precision defined for this type
ERROR: 0:10: 'vec3' : No precision defined for this type
ERROR: 0:11: 'vec3' : No precision defined for this type
ERROR: 0:12: 'vec4' : No precision defined for this type
ERROR: 0:12: 'gl_FrontLightModelProduct' : undeclared identifer
ERROR: 0:12: 'sceneColor' : field selection requires structure, vector,
or matrix on left hand side
ERROR: 0:12: 'assign' : cannot convert from 'float' to '4-component
vector of float'
ERROR: 0:13: 'gl_FrontLightProduct' : undeclared identifer
ERROR: 0:13: 'gl_FrontLightProduct' : left of '[' is not of type array,
matrix, or vector
ERROR: 0:13: 'ambient' : illegal vector field selection
ERROR: 0:14: 'float' : No precision defined for this type
ERROR: 0:15: 'gl_FrontLightProduct' : undeclared identifer
ERROR: 0:15: 'gl_FrontLightProduct' : left of '[' is not of type array,
matrix, or vector
ERROR: 0:15: 'diffuse' : illegal vector field selection
ERROR: 0:19: 'vec3' : No precision defined for this type
ERROR: 0:20: 'gl_FrontLightProduct' : undeclared identifer
ERROR: 0:20: 'gl_FrontLightProduct' : left of '[' is not of type array,
matrix, or vector
ERROR: 0:20: 'specular' : illegal vector field selection
ERROR: 0:20: 'rgb' : field selection requires structure or vector on
left hand side
ERROR: 0:20: '*' : Wrong operand types. No operation '*' exists that
takes a left-hand operand of type 'float' and a right operand of type
'invalid' (and there
is no acceptable conversion)
ERROR: 0:21: 'gl_FrontMaterial' : undeclared identifer
ERROR: 0:21: 'shininess' : field selection requires structure, vector,
or matrix on left hand side
ERROR: 31 compilation errors. No code generated.
State's vertex attrib binding 2, osg_Color
State's vertex attrib binding 7, osg_FogCoord
State's vertex attrib binding 3, osg_MultiTexCoord0
State's vertex attrib binding 4, osg_MultiTexCoord1
State's vertex attrib binding 5, osg_MultiTexCoord2
State's vertex attrib binding 6, osg_MultiTexCoord3
State's vertex attrib binding 7, osg_MultiTexCoord4
State's vertex attrib binding 1, osg_Normal
State's vertex attrib binding 6, osg_SecondaryColor
State's vertex attrib binding 0, osg_Vertex
glLinkProgram "" FAILED
Program "" infolog:
Link Error: Vertex shader was not successfully compiled.
Link Error: Fragment shader was not successfully compiled.
Warning: detected OpenGL error GL_INVALID_OPERATION at After
Renderer::compile
Warning: Material::apply(State&) - not supported.
Warning: TexGen::apply(State&) - not supported.
Warning: Material::apply(State&) - not supported.
Warning: TexGen::apply(State&) - not supported.
Warning: detected OpenGL error GL_INVALID_ENUM at after RenderBin::draw(..)
--8<-------------------------------
picoflamingo wrote:
Hello,
Not sure if this has been reported so far (I couldn't find anything in
the mailing list archive).
I have been trying to run OSG 2.9.6 in a BeagleBoard (OpenGL ES 2.0)
with partial success. Just after compiling, when running osgviewer, I
got a window with the classical OSG blue background but nothing was
rendered. Looking at the log, I found that the vertex and fragment
shaders compilation failed.
The main problem is that the OpenGL ES 2.0 library for the BeagleBoard
expects a precision qualifier for every single declaration. This
doesn't happen in the Imagination emulator, so it has to be tried in
the real HW (AFAIK).
I modified the ShaderGen.cpp file to include the missing qualifiers (I
just prepend highp to every single vec and mat declaration, including
attributes, uniforms and varyings). I also modify State.cpp to add the
qualifier to the different Uniforms, but I'm not sure if that had some
effect.
Finally, I just override the ShaderGen.cpp to produce a simple
vertex/fragment shader-pair just to check that it can render
something, and that worked for simple color objects (no material, no
texture,...). I could render the axis.osg and glider.osg models.
I do not know enough about OSG internals to produce a proper patch for
this, so hope that this information could help to make OSG work in the
BeagleBoard (and probably in other OMAP3 platforms -OpenPandora,
N900,..-) in the next stable release. If I can help in any way (as
tester for instance), please just let me know.
I was using the OSG 2.9.6 tarball, not the svn version, so if this is
already fixed, please ignore this message.
--
picoFlamingo Project: http://community.papermint-designs.com/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org