Jump to content

  • Log In with Google      Sign In   
  • Create Account


Strange GLSL issue


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Homunculi   Members   -  Reputation: 133

Like
0Likes
Like

Posted 28 May 2012 - 09:49 AM

My program works on my laptop but it doesn't work on my friends laptop.

The graphics card which I use is:

GeForce 8600M GT/PCI/SSE2 from NVIDIA Corporation

The graphics card which he uses is:

ATI Mobility Radeon HD 3650 from ATI Technologies

The error outputted to stdout is rather random but it's always along the lines of this:

Shader Failed to Compile Vertex shader failed to compile with the following errors:

ERROR: 0:8: error(#132) Syntax error: 'E968' parse error
ERROR: error(#273) 1 compilation errors. No code generated

Shader Failed to Compile Fragment shader failed to compile with the following errors: ERROR: 0:7: error(#132) Syntax error: 'ix' parse error ERROR: error(#273) 1 compilation errors. No code generated


I tried several different ways of doing the fragment shader including specifying different versions of glsl useing #version and it seems that no matter what I get to work on mine it doesn't work on his.

The vertex shader seems to work on his though because it's outputting the polygons just they are all white.

Right now the fragment shader is only this and it still doesn't work on his laptop but it works on mine:

uniform vec4 color;

void main()
{
	gl_FragColor = color;
}

Also, it seems to be very picky on my side on whether it will compile or not...

like if I were to have something like:

gl_Position = gl_ModelViewProjectionMatrix*gl_Vertex;

then it would work but if I had

gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;

then it won't work. The spaces beside the '*' mess it up.

Is this really normal?

Edited by Homunculi, 28 May 2012 - 09:53 AM.


Sponsor:

#2 V-man   Members   -  Reputation: 797

Like
2Likes
Like

Posted 28 May 2012 - 12:48 PM

I see this problem come up often on these forums. Perhaps you aren't NULL terminating the string you send to GL or you aren't reading in the shader text file properly.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS