PDA

View Full Version : [SFML/C++] Linking shader returns GL_FALSE, but no log, and no output on screen



Symphonym
01-21-2013, 11:26 PM
Hello
So I'm follow this: ogldev.atspace.co.uk/www/tutorial04/tutorial04.html tutorial in order to learn OpenGL. And currently I'm learning to use shaders, however, when I'm linking my shader program, "glGetProgramiv" returns GL_FALSE but there's no error log from "glGetProgramInfoLog".

I'm currently programming on Xubuntu (Ubuntu 12.10), and using the "NVIDIA binary Xorg driver, kernel module and VDPAU library from nvidia-current (proprietary, tested)" driver. On a Geforce GTX 560 Ti if that matters. But anyway, below is a link to my code, the first page is my main.cpp file where I run the rendering and gameloop, and in the symGL file i have a little utility class for loading shaders. Any idea what's the problem?

Code: gist.github.com/4592760
Output: i.imgur.com/QNE67JX.png

Source code of the vertex shader can be found in the output image as well.

Alfonse Reinheart
01-21-2013, 11:48 PM
however, when I'm linking my shader program, "glGetProgramiv" returns GL_FALSE

glGetProgramiv can "return" many values; what exactly is the line of code that is giving you GL_FALSE?

Symphonym
01-22-2013, 06:31 AM
glGetProgramiv can "return" many values; what exactly is the line of code that is giving you GL_FALSE?

In sym.cpp, line 51

Symphonym
01-22-2013, 07:29 AM
I solved the problem, when checking for linking errors, I was passing my shader object, and not the program object. Everything is working fine now :)