I have successfully compiled an OpenGL ES 2.0 program on scratchbox for
the FREMANTILE_ARMEL plattform. However, when running the program on Nokia
N900 the compilation of the vertex and fragment shaders fails. This is the
error code:
------------------------------------------------
Failed to compile fragment shader: Compile failed.
ERROR: 0:1: 'varying' : syntax error; parse error
ERROR: 1 compilation errors. No code generated.
Failed to compile fragment shader: Compile failed.
ERROR: 0:1: 'attribute' : syntax error; parse error
ERROR: 1 compilation errors. No code generated.
Failed to link program: Link Error: Vertex shader is missing.
Link Error: Fragment shader is missing.
--------------------------------------------------
This is my vertex shader:
const char* pszVertShader = "\
highp attribute vec4 myVertex;\
lowp attribute vec4 fargKod;\
mediump attribute vec2 myUV;\
highp uniform mat4 yRotMatris;\
highp uniform mat4 xRotMatris;\
highp uniform mat4 frustMatris;\
lowp varying vec4 outColor;\
mediump varying vec2 myTextCoord;\
void main(void)\
{\
outColor = fargKod;\
myTextCoord = myUV;\
gl_Position = myVertex * yRotMatris * xRotMatris;\
}";
and this is my fragment shader:
const char* pszFragShader = "\
uniform sampler2D sampler2d;\
mediump varying vec2 myTextCoord;\
void main (void)\
{\
gl_FragColor = texture2D(sampler2d,myTextCoord);\
}";
These shader compile successfully and works fine when I run the same
OGLES2 program in the simulation environment.
Does anyone have a clue what could be wrong? Is there perhaps something
that need to be installed on the Nokia N900 to add shader compilation
support to it???
/Jonny
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers