… | |
… | |
189 | $data = $pb->get_pixels; |
189 | $data = $pb->get_pixels; |
190 | } |
190 | } |
191 | |
191 | |
192 | my ($tw, $th) = @$self{qw(width height)}; |
192 | my ($tw, $th) = @$self{qw(width height)}; |
193 | |
193 | |
194 | unless ($GL_NPOT) { |
194 | unless ($GL_NPOT && $tw && $th) { |
195 | $tw = topot $tw; |
195 | $tw = topot $tw; |
196 | $th = topot $th; |
196 | $th = topot $th; |
197 | |
197 | |
198 | if (defined $data) { |
198 | if (defined $data) { |
199 | my $bpp = (length $data) / ($self->{width} * $self->{height}); |
199 | my $bpp = (length $data) / ($self->{width} * $self->{height}); |