File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -448,12 +448,14 @@ sub togl_setup {
448448 }
449449 @{ $this -> {Impl } }{@KEYS } = @SPHERE {@KEYS };
450450 $SHADER_PROGRAM //= $this -> compile_program($vertex_shader , $fragment_shader );
451- $this -> {Impl }{program_nodestroy } = $SHADER_PROGRAM ;
452- $this -> load_attrib(position => $this -> {Impl }{vertices });
453- $this -> load_attrib(normal => $this -> {Impl }{normals });
451+ if (!defined $this -> {Impl }{program_nodestroy }) {
452+ $this -> {Impl }{program_nodestroy } = $SHADER_PROGRAM ;
453+ $this -> load_attrib(position => $this -> {Impl }{vertices });
454+ $this -> load_attrib(normal => $this -> {Impl }{normals });
455+ $this -> load_idx_buffer(indx_buf => $this -> {Impl }{idx });
456+ }
454457 $this -> {Impl }{offset_loc } = $this -> load_attrib(offset => $points );
455458 $this -> {Impl }{noffset } = $points -> dim(1);
456- $this -> load_idx_buffer(indx_buf => $this -> {Impl }{idx });
457459 $this -> togl_unbind;
458460}
459461sub gdraw {
You can’t perform that action at this time.
0 commit comments