… | |
… | |
50 | |
50 | |
51 | sub gl_check { |
51 | sub gl_check { |
52 | return unless $GL_DEBUG; |
52 | return unless $GL_DEBUG; |
53 | |
53 | |
54 | if (my $error = glGetError) { |
54 | if (my $error = glGetError) { |
55 | Carp::cluck sprintf "opengl error %x while %s", $error, sprintf @_; |
55 | Carp::cluck sprintf "opengl error %x while %s", $error, &sprintf(@_); |
56 | } |
56 | } |
57 | } |
57 | } |
58 | |
58 | |
59 | sub find_rcfile($) { |
59 | sub find_rcfile($) { |
60 | my $path; |
60 | my $path; |
… | |
… | |
371 | $tw, $th, |
371 | $tw, $th, |
372 | 0; |
372 | 0; |
373 | CFClient::gl_check "copying to texture %dx%d if=%x", |
373 | CFClient::gl_check "copying to texture %dx%d if=%x", |
374 | $tw, $th, $self->{internalformat}; |
374 | $tw, $th, $self->{internalformat}; |
375 | } |
375 | } |
|
|
376 | |
|
|
377 | glBindTexture GL_TEXTURE_2D, 0; # just to be on the safe side |
376 | } |
378 | } |
377 | |
379 | |
378 | sub DESTROY { |
380 | sub DESTROY { |
379 | my ($self) = @_; |
381 | my ($self) = @_; |
380 | |
382 | |