PDA

View Full Version : glGetUniformiv crashes on ATI?



pjcozzi
12-16-2009, 08:30 AM
Hello,

I have a shader with a bool uniform:


uniform bool u_Bool;

After successfully linking. I query its initial value with:


int value;
glGetUniformiv(program, index, &value);

This doesn't crash on NVIDIA (although the returned value is incorrect: related post (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=266719&#Post266 719)). It is crashing on ATI HD2400 and HD4350 on Windows XP with updated drivers.

As a workaround, I've changed glGetUniformiv to glGetUniformfv. Is the integer version of GetUniform not supposed to work with bools? I've found nothing in the OpenGL or GLSL spec that would make me think this.

Regards,
Patrick

Alfonse Reinheart
12-16-2009, 10:28 AM
If even NVIDIA has driver bugs in that part of the API, it's probably best to abandon this approach and try to do things differently.

pjcozzi
12-16-2009, 11:25 AM
If even NVIDIA has driver bugs in that part of the API, it's probably best to abandon this approach and try to do things differently.
lol. Yes, I am likely to replace bools with floats but I still want to make sure I'm not doing anything wrong.

Regards,
Patrick