Talk:Tutorial3: Rendering 3D Objects (C /SDL): Difference between revisions

From OpenGL Wiki
Jump to navigation Jump to search
Dfalbe (talk | contribs)
No edit summary
Dfalbe (talk | contribs)
No edit summary
Line 1: Line 1:
Has any one managed to successfully compile/link this code under windows. I tried getting this to run using SDL 1.3 and GLEW 1.53 on the VC++ 2008 compiler it seemingly compile fine however all that I manage to see is a white background in the spawned window.
Has any one managed to successfully compile/link this code under windows. I tried getting this to run using SDL 1.3 and GLEW 1.53 on the VC++ 2008 compiler it seemingly compiles fine however all that I manage to see is a white background in the spawned window.


== Solved my issue with Tutorial3 ==
== Solved my issue with Tutorial3 ==


After some debugging I narrowed down the issue to an issue with the fragment shader. I believe the issue was caused but the shader compiler supplied by the driver was being strict, possibly because of the original use of the gl_FragColor which is now depreciated.
After some debugging I narrowed down the issue to an issue with the fragment shader. I believe the issue was caused by the shader compiler supplied by the driver was being strict, possibly because of the original use of the gl_FragColor which is now depreciated.


Changes I made to fix the issue for my uses.
Changes I made to fix the issue for my uses.

Revision as of 02:52, 3 May 2010

Has any one managed to successfully compile/link this code under windows. I tried getting this to run using SDL 1.3 and GLEW 1.53 on the VC++ 2008 compiler it seemingly compiles fine however all that I manage to see is a white background in the spawned window.

Solved my issue with Tutorial3

After some debugging I narrowed down the issue to an issue with the fragment shader. I believe the issue was caused by the shader compiler supplied by the driver was being strict, possibly because of the original use of the gl_FragColor which is now depreciated.

Changes I made to fix the issue for my uses.

File: tutorial3.frag

#version 150

in  vec3 ex_Color;

out vec4 fragColor;



void main(void)

{

	fragColor = vec4(ex_Color, 1.0);

}