new_programmer
new_programmer

Reputation: 860

iPhone openGL error : ERROR: 0:1: '<' : syntax error syntax error

Hi Friends I am new to openGLES, trying to work with HelloArrow program using shaders from a Site

but when i compiled i got the following error,

Source code Download HelloArrow.zip


ERROR: 0:1: '<' : syntax error syntax error
ERROR: Parser found no code to compile in source strings.


//  VERTEX SHADER

const char* SimpleVertexShader = STRINGIFY( attribute vec4 Position; attribute vec4 SourceColor; varying vec4 DestinationColor; uniform mat4 Projection; uniform mat4 Modelview;

void main(void) { printf("fragment shader"); DestinationColor = SourceColor; gl_Position = Projection * Modelview * Position; } );


//  FRAGMENT SHADER

const char* SimpleFragmentShader = STRINGIFY( 
    varying lowp vec4 DestinationColor;
    void main(void)
    {
    printf("fragment shader");
        gl_FragColor = DestinationColor;`
    } 
);

I don't have any idea.

Your suggestions are important to me so don't leave without a comment or answer

[Sorry for my poor English]

Upvotes: 1

Views: 2176

Answers (1)

Matthias Bauch
Matthias Bauch

Reputation: 90117

have a very close look at this line:

 gl_FragColor = DestinationColor;`

the character behind the ; should not be there

;-)

Upvotes: 3

Related Questions