Skip to content

Commit 3979005

Browse files
committed
move all gdraw to ::GL
1 parent 8442e28 commit 3979005

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

lib/PDL/Graphics/TriD/GL.pm

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@ sub PDL::Graphics::TriD::EuclidAxes::gdraw {
114114
PDL::gl_lines_col($points, [1,1,1]);
115115
}
116116

117+
sub PDL::Graphics::TriD::Labels::gdraw {
118+
my ($this,$points) = @_;
119+
glDisable(GL_LIGHTING);
120+
glColor3d(1,1,1);
121+
PDL::Graphics::OpenGLQ::gl_texts($points,@{$this->{Options}}{qw(Strings)});
122+
glEnable(GL_LIGHTING);
123+
}
124+
117125
use POSIX qw//;
118126
sub PDL::Graphics::TriD::Quaternion::togl {
119127
my($this) = @_;
@@ -204,6 +212,15 @@ sub PDL::Graphics::TriD::Lattice::gdraw {
204212
}
205213
}
206214

215+
sub PDL::Graphics::TriD::MathGraph::gdraw {
216+
my($this,$points) = @_;
217+
glDisable(GL_LIGHTING);
218+
glColor3d(@{$this->{Options}{Color}});
219+
PDL::Graphics::OpenGLQ::gl_arrows($points,@{$this->{Options}}{qw(From To
220+
ArrowLen ArrowWidth)});
221+
glEnable(GL_LIGHTING);
222+
}
223+
207224
sub PDL::Graphics::TriD::LineStrip::gdraw {
208225
my($this,$points) = @_;
209226
PDL::gl_line_strip_col($points,$this->{Colors});

lib/PDL/Graphics/TriD/Labels.pm

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,6 @@ use PDL::Graphics::OpenGLQ;
3535
use PDL::Graphics::TriD::Objects;
3636
use base qw/PDL::Graphics::TriD::GObject/;
3737

38-
sub gdraw {
39-
my ($this,$points) = @_;
40-
glDisable(&GL_LIGHTING);
41-
glColor3d(1,1,1);
42-
PDL::Graphics::OpenGLQ::gl_texts($points,@{$this->{Options}}{qw(Strings)});
43-
glEnable(&GL_LIGHTING);
44-
}
45-
4638
sub get_valid_options {
4739
return {UseDefcols => 0, Strings => []}
4840
}

lib/PDL/Graphics/TriD/MathGraph.pm

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,6 @@ use PDL::Graphics::TriD::Objects;
3535
use base qw/PDL::Graphics::TriD::GObject/;
3636
use OpenGL qw(:all);
3737

38-
sub gdraw {
39-
my($this,$points) = @_;
40-
glDisable(&GL_LIGHTING);
41-
glColor3d(@{$this->{Options}{Color}});
42-
PDL::Graphics::OpenGLQ::gl_arrows($points,@{$this->{Options}}{qw(From To
43-
ArrowLen ArrowWidth)});
44-
glEnable(&GL_LIGHTING);
45-
}
46-
4738
sub get_valid_options {
4839
return {UseDefcols => 0,From => [],To => [],Color => [1,1,1],
4940
ArrowWidth => 0.02, ArrowLen => 0.1}

0 commit comments

Comments
 (0)