glGetUniformLocation returns -1 for most uniforms

Joel Leclerc <[email protected]>
Newsgroups gmane.comp.video.mesa3d.user
Message-ID <CACFdZSQL1gps4BPRHKn2i=bVt8wC=Wck5mF8noJ2yQrXv3Pe8A@mail.gmail.com>
Normally, I use the proprietary nvidia GL driver to test my application,
but now that I use the mesa backend, for some reason, glGetUniformLocation
returns -1 on certain uniforms (for reasons I can't comprehend).

Here is part of my shader source:

uniform mat4 N_MVP;
uniform bool N_UV_flip;
uniform float N_UV_z;
uniform float N_alpha;
uniform bool N_3D;
uniform float N_time;
uniform float N_rand;

If I run glGetUniformLocation(shader->shader_handle, "N_rand"), it returns
-1. same for N_time, and N_UV_z. However, using the same code for N_alpha
returns 2.

This does not happen on the nvidia GL driver.

Any clues as to why? Source code is available here:
https://github.com/MiJyn/nightmare and
https://github.com/MiJyn/silentponyville .

-- 
Joel Leclerc
Individual software and game developer,
   Lead developer of the SythOS project.
Main email: [email protected] | Chat: [email protected]
Twitter: @__MiJyn__ <https://twitter.com/__MiJyn__> | Website:
http://mijyn.github.io/
Github: https://github.com/MiJyn

_______________________________________________
mesa-users mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.