Skip to content

Commit 3defab3

Browse files
committed
highlight to only use 2D coords
1 parent 1447b8e commit 3defab3

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
@@ -980,14 +980,13 @@ sub PDL::Graphics::TriD::GL::Highlight::primitive {OpenGL::Modern::GL_LINE_LOOP}
980980
sub highlight {
981981
my ($vp) = @_;
982982
my $hl = $vp->{Impl}{highlight} //= PDL::Graphics::TriD::GL::Highlight->new(
983-
PDL->zeroes(PDL::float, 3, 4),
983+
PDL->zeroes(PDL::float, 2, 4),
984984
PDL->new(PDL::float, [1,1,1]),
985985
{ LineWidth => 4 },
986986
);
987987
my ($w, $h) = @$vp{qw(W H)};
988988
if (!$hl->{IsValid}) {
989-
$hl->{Points} .= PDL->new(PDL::float, [[0,0,0], [$w,0,0],
990-
[$w,$h,0], [0,$h,0]]),
989+
$hl->{Points} .= PDL->new(PDL::float, [[0,0], [$w,0], [$w,$h], [0,$h]]),
991990
$hl->togl_setup;
992991
$hl->{IsValid} = 1;
993992
}

0 commit comments

Comments
 (0)