Skip to content

Commit 8cdeef4

Browse files
committed
set_uniform to ignore uniforms optimised out
1 parent dcd4326 commit 8cdeef4

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • lib/PDL/Graphics/TriD

lib/PDL/Graphics/TriD/GL.pm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,7 @@ sub set_uniform {
250250
PDL::barf "set_uniform: unknown suffix '$suffix'" unless $SUFFIX2FUNC{$suffix};
251251
PDL::barf "set_uniform: no program found" unless
252252
my ($program) = grep defined, @{ $this->{Impl} }{qw(program program_nodestroy)};
253-
PDL::barf "set_uniform: invalid name '$name'" if 0 >
254-
(my $loc = glGetUniformLocation($program, $name));
253+
return if 0 > (my $loc = glGetUniformLocation($program, $name)); # got elim
255254
$this->{Impl}{uniform_indices}{$name} = [ $loc, $suffix, $value ];
256255
$loc;
257256
}

0 commit comments

Comments
 (0)