1

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]

1 Answer 1

3

have a very close look at this line:

 gl_FragColor = DestinationColor;`

the character behind the ; should not be there

;-)

Sign up to request clarification or add additional context in comments.

1 Comment

@fluchpunkt: Great!! its third time i'm posting the same question. only you answered. Great. Thanks a lot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.