Skip Menu |

This queue is for tickets about the OpenGL-Shader CPAN distribution.

Report information
The Basics
Id: 49257
Status: new
Priority: 0/
Queue: OpenGL-Shader

People
Owner: Nobody in particular
Requestors: corion [...] cpan.org
Cc: BFREE [...] cpan.org
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.01
Fixed in: (no value)



CC: bfree [...] cpan.org
Subject: OpenGL::Shader uses weird/wrong error checking
(cced to your @cpan.org account) Thank you for writing OpenGL::Shader! After upgrading to an ATi brand video card, I found that the module seems to use glGetInfoLogARB() to check for errors. This is bad because the OpenGL implementation of ATi seems to issuse happy messages on success, such as: Fragment shader was successfully compiled to run on hardware. The attached patch fixes this by using if (my $error = glGetError()) { ... issue relevant error message } instead. With this patch, my shaders and program work as they did before. -max
Subject: OpenGL-Shader-Objects-errorfix.patch
20c20 < $VERSION = '1.01'; --- > $VERSION = '1.01_01'; 111,112c111,114 < my $stat = glGetInfoLogARB_p($self->{fragment_id}); < return "Fragment shader: $stat" if ($stat); --- > if (my $error = glGetError()) { > my $stat = glGetInfoLogARB_p($self->{fragment_id}); > return "Fragment shader: $error: $stat" if ($stat); > }; 126,127c128,133 < $stat = glGetInfoLogARB_p($self->{vertex_id}); < return "Vertex shader: $stat" if ($stat); --- > if (my $error = glGetError()) { > my $stat = glGetInfoLogARB_p($self->{vertex_id}); > return "Vertex shader: $error: $stat" if ($stat); > }; > #$stat = glGetInfoLogARB_p($self->{vertex_id}); > #return "Vertex shader: $stat" if ($stat);