Skip to content

Commit 87fdaaa

Browse files
committed
no need widthpix as list
1 parent b242dd6 commit 87fdaaa

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • lib/PDL/Graphics/TriD

lib/PDL/Graphics/TriD/GL.pm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ fs_out_light => <<'EOF',
110110
light(lightind, vPosition, gl_FrontFacing ? vNormal : -vNormal, in_diffuse, diffuse, spec);
111111
gl_FragColor = gl_FrontLightProduct[lightind].ambient + diffuse + spec;
112112
EOF
113-
fs_lightind_decl => " uniform int lightind;\n",
113+
fs_lightind_decl => "uniform int lightind;\n",
114114
);
115115

116116
{ package # hide from PAUSE
@@ -371,7 +371,6 @@ sub _font_setup {
371371
my ($texture, $rightbound, $orig) = gl_font_texture();
372372
$fref->{texture} = PDL::float(1,1,1,1) * $texture->dummy(0,1);
373373
my $widthpix = $rightbound->numdiff; $widthpix->slice('0') += 1;
374-
@{ $fref->{widthpix} } = $widthpix->list;
375374
$fref->{widthflt} = $widthpix->float;
376375
$fref->{widthflt11} = $fref->{widthflt}->t->append([1,1])->dummy(1);
377376
$fref->{heightpix} = $texture->dim(1);
@@ -385,7 +384,7 @@ sub _font_setup {
385384
$fref->{texture} = PDL::float(1,1,1,1) * $texture->dummy(0,1);
386385
# 4 = top-left, bot-left, top-right, bot-right, triangle idx=012,213
387386
$fref->{idx} = PDL->new(PDL::ulong, [0,1,2], [2,1,3]);
388-
$fref->{texcoords} = my $texcoords = PDL->zeroes(PDL::float,2,4,$numchars);
387+
my $texcoords = $fref->{texcoords} = PDL->zeroes(PDL::float,2,4,$numchars);
389388
$texcoords->slice('(0),0:1') .= $leftbound->dummy(0,1); # u of left
390389
$texcoords->slice('(0),2:3') .= $rightbound->dummy(0,1); # u of right
391390
$texcoords->slice('(1),0::2') .= 1; # v of top, v bot=already 0

0 commit comments

Comments
 (0)