Calling glGetUniformLocation between glNewList and glEndList always returns 0, even if the variable being requested does not exist in the program. Occurs with at least swrast and i965. I tested both mesa 7.8.2 and git master. Restructuring the program so that the glGetUniformLocation is called outside of the list makes it work. For example: glNewList(1, GL_COMPILE_AND_EXECUTE); var = glGetUniformLocation(program, "something"); /* var will now be zero, regardless of the program or "something" */ /* do other stuff */ glEndList();
commit 5482eaba6ecd4a581377336b6409019adf67869e Author: Nick Bowler <nbowler@draconx.ca> Date: Thu Aug 19 12:19:55 2010 -0400 mesa: Fix GetUniformLocation while compiling display lists.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.