@@ -805,12 +805,6 @@ Returns a new OpenGL object.
805805
806806=item width,height - the width and height of the window in pixels (500,500)
807807
808- =item parent - the parent under which the new window should be opened (root)
809-
810- =item mask - the user interface mask (StructureNotifyMask)
811-
812- =item attributes - attributes to pass to glXChooseVisual
813-
814808=back
815809
816810Allowed 3d window types, case insensitive, are:
@@ -823,13 +817,25 @@ Allowed 3d window types, case insensitive, are:
823817
824818=item x11 - use Perl OpenGL (POGL) bindings with X11
825819
820+ Additional attributes for X11 windows:
821+
822+ =over
823+
824+ =item parent - the parent under which the new window should be opened (root)
825+
826+ =item mask - the user interface mask (StructureNotifyMask)
827+
828+ =item attributes - attributes to pass to glXChooseVisual
829+
830+ =back
831+
826832=back
827833
828834=cut
829835
830836sub new {
831837 my ($class ,$options ,$window_obj ) = @_ ;
832- my $opt = PDL::Options-> new(default_options() );
838+ my $opt = PDL::Options-> new($class -> default_options);
833839 $opt -> incremental(1);
834840 $opt -> options($options ) if (defined $options );
835841 my $p = $opt -> options;
@@ -842,16 +848,13 @@ default options for object oriented methods
842848
843849=cut
844850
845- sub default_options{
846- { ' x' => 0,
847- ' y' => 0,
848- ' width' => 500,
849- ' height' => 500,
850- ' parent' => 0,
851- ' mask' => eval ' &OpenGL::StructureNotifyMask' ,
852- ' steal' => 0,
853- ' attributes' => eval ' [ &OpenGL::GLX_DOUBLEBUFFER, &OpenGL::GLX_RGBA ]' ,
854- }
851+ sub default_options {
852+ {
853+ x => 0,
854+ y => 0,
855+ width => 500,
856+ height => 500,
857+ }
855858}
856859
857860=head2 swap_buffers
0 commit comments