Talk:Tutorial3: Rendering 3D Objects (C /SDL): Difference between revisions
Jump to navigation
Jump to search
No edit summary |
→Solved my issue with Tutorial3: new section |
||
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 compile 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 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. | |||
Changes I made to fix the issued for my uses. | |||
File: tutorial3.frag | |||
#version 150 | |||
in vec3 ex_Color; | |||
out vec4 fragColor; | |||
void main(void) | |||
{ | |||
fragColor = vec4(ex_Color, 1.0); | |||
} |
Revision as of 02:43, 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 compile 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 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.
Changes I made to fix the issued for my uses.
File: tutorial3.frag
- version 150
in vec3 ex_Color;
out vec4 fragColor;
void main(void)
{
fragColor = vec4(ex_Color, 1.0);
}