Skip to content

Commit dbb73cd

Browse files
committed
load_texture return ID
1 parent 7be3dd5 commit dbb73cd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • lib/PDL/Graphics/TriD

lib/PDL/Graphics/TriD/GL.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ sub load_texture {
203203
glTexParameteri($target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
204204
glTexParameteri($target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
205205
glTexParameteri($target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
206+
$this->{Impl}{$idname};
206207
}
207208
sub togl_bind {
208209
my ($this) = @_;
@@ -396,8 +397,7 @@ sub togl_setup {
396397
if (defined $FONT_ID and glIsTexture($FONT_ID)) {
397398
$this->{Impl}{font_id} = $FONT_ID;
398399
} else {
399-
$this->load_texture(font_id => $FONT{texture}, GL_RGBA32F, ($FONT{texture}->dims)[1,2], GL_RGBA);
400-
$FONT_ID = $this->{Impl}{font_id};
400+
$FONT_ID = $this->load_texture(font_id => $FONT{texture}, GL_RGBA32F, ($FONT{texture}->dims)[1,2], GL_RGBA);
401401
}
402402
$points //= $this->{Points}; # as Labels is used in Graph
403403
my $numchars = $FONT{numchars};

0 commit comments

Comments
 (0)