View Full Version : getting uniform variable location
03-03-2004, 08:01 AM
every time i call glGetUniformLocation() it returns -1 http://www.opengl.org/discussion_boards/ubb/frown.gif
the program runs fine but i cant change any of the uniform variables
they are declared like this:
uniform sampler2D textures;
uniform int numTextures;
03-03-2004, 09:55 AM
Can you post the part of your code where you are calling this? Usually a -1 means that the uniform variable is not found in the specified program object, or that it starts with a reserved prefix gl_*.
03-07-2004, 03:34 AM
are you using your variables?
This is from the spec:
"A uniform is considered “active” if it is determined by the compiler
and linker that the uniform will actually be accessed when the executable code is
any unactive variable will probably return -1.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.