-
getting uniform variable location
every time i call glGetUniformLocation() it returns -1 
the program runs fine but i cant change any of the uniform variables
they are declared like this:
uniform sampler2D textures;
uniform int numTextures;
any ideas
-
Re: getting uniform variable location
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_*.
-
Re: getting uniform variable location
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
executed."
any unactive variable will probably return -1.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules