On Thu, 2010-02-25 at 10:38 +0100, ext Jonny Karlsson wrote:
> Thank you for your prompt answer!
> 
> I noticed I had precision and variable type the wrong way and changed that 
> (it still worked in the emulator though). I also removed the precision 
> values from all attributes. But I still get the same error. This is very 
> weird, it 
> seams like the shader code is not recognized on the Nokie device at all..

We use shaders in hildon-desktop. Maybe looking at those helps with the
syntax:
http://maemo.gitorious.org/fremantle-hildon-desktop/hildon-desktop/blobs/master/src/tidy/tidy-blur-group.c

Notice that the GLES shader specification allows the implementation to
slack at times when it comes to precisions. 
http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

-Kimmo

> 
> /Jonny
> 
> 
> On Thu, 25 Feb 2010, Kimmo Hämäläinen wrote:
> 
> > On Wed, 2010-02-24 at 22:37 +0100, ext Jonny Karlsson wrote:
> >> 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.
> >
> > "mediump varying" -> "varying mediump"
> >
> >>
> >> Failed to compile fragment shader: Compile failed.
> >> ERROR: 0:1: 'attribute' : syntax error; parse error
> >> ERROR: 1 compilation errors. No code generated.
> >
> > Try removing highp/lowp/mediump from attributes, since those are given
> > as input, so maybe you cannot define their precision.
> >
> > -Kimmo
> >
> >>
> >>
> >> 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
> >

_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to