Skip to content

Commit 9fbc910

Browse files
committed
correct debugging messages
1 parent e501090 commit 9fbc910

4 files changed

Lines changed: 7 additions & 8 deletions

File tree

lib/PDL/Graphics/TriD/GL.pm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ use fields qw/Ev Width Height Interactive _GLObject
485485

486486
sub gdriver {
487487
my($this, $options) = @_;
488-
print "GL gdriver...\n" if($PDL::Graphics::TriD::verbose);
488+
print "GL gdriver...\n" if $PDL::Graphics::TriD::verbose;
489489
if(defined $this->{_GLObject}){
490490
print "WARNING: Graphics Driver already defined for this window \n";
491491
return;
@@ -786,7 +786,6 @@ and graphics contexts.
786786
787787
Defaults to using L<OpenGL::GLFW> - override by setting the environment
788788
variable C<POGL_WINDOW_TYPE> to C<glut>, C<x11> , or the default is C<glfw>.
789-
This is implemented by C<PDL::Graphics::TriD::Window::gdriver>.
790789
791790
=head2 new
792791

lib/PDL/Graphics/TriD/GL/GLFW.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ sub new {
3030
glfwSetWindowRefreshCallback($glfwin,\&_display_wrapper);
3131
glfwShowWindow($glfwin);
3232
if ($PDL::Graphics::TriD::verbose) {
33-
print "gdriver: Got TriD::GL object(GLFW window ID#$self->{window_seq} " . $self->{glfwwindow} . ")\n";
33+
print "GLFW driver: Got TriD::GL object(GLFW window ID#$self->{window_seq} " . $self->{glfwwindow} . ")\n";
3434
}
3535
$self->{winobjects}->{$self->{glfwwindow}} = $window_obj; # circular ref
3636
$self;

lib/PDL/Graphics/TriD/GL/GLUT.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ sub _init_glut_window {
4949
glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS) if _have_freeglut();
5050
glutMainLoopEvent(); # pump event loop so window appears
5151
if ($PDL::Graphics::TriD::verbose) {
52-
print "gdriver: Got TriD::GL object(GLUT window ID# " . $self->{glutwindow} . ")\n";
52+
print "GLUT driver: Got TriD::GL object(GLUT window ID# " . $self->{glutwindow} . ")\n";
5353
}
5454
$self->{winobjects}->[$self->{glutwindow}] = $window_obj; # circular ref
5555
}

lib/PDL/Graphics/TriD/Window.pm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ sub new {
1616
my $this = $arg->SUPER::new();
1717
print "PDL::Graphics::TriD::Window - got back $this\n" if($PDL::Graphics::TriD::verbose);
1818
# Make sure the Graphics has been initialized
19-
$options->{width} = 600 unless defined $options->{width};
20-
$options->{height} = 600 unless defined $options->{height};
19+
$options->{width} //= 600;
20+
$options->{height} //= 600;
2121
$this->{Width} = $options->{width};
2222
$this->{Height} = $options->{height};
23-
print "PDL::Graphics::TriD::Window: calling gdriver....\n" if($PDL::Graphics::TriD::verbose);
23+
print "PDL::Graphics::TriD::Window: calling gdriver....\n" if $PDL::Graphics::TriD::verbose;
2424
$this->{Interactive} = $this->gdriver($options);
25-
print "PDL::Graphics::TriD::Window: gdriver gave back $this->{Interactive}....\n" if($PDL::Graphics::TriD::verbose);
25+
print "PDL::Graphics::TriD::Window: gdriver gave back $this->{Interactive}....\n" if $PDL::Graphics::TriD::verbose;
2626
# set default values
2727
if($this->{Interactive}){
2828
print "\tIt's interactive... calling ev_defaults...\n" if($PDL::Graphics::TriD::verbose);

0 commit comments

Comments
 (0)