mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-06 21:44:08 -06:00
Use a single gl context created in c++
This commit is contained in:
parent
a02ea39525
commit
44220530cb
7 changed files with 42 additions and 26 deletions
|
@ -145,7 +145,7 @@ sub new {
|
|||
#==============================================================================================================================
|
||||
|
||||
#==============================================================================================================================
|
||||
Slic3r::GUI::_3DScene::add_canvas($self, $self->GetContext);
|
||||
Slic3r::GUI::_3DScene::add_canvas($self);
|
||||
Slic3r::GUI::_3DScene::allow_multisample($self, $can_multisample);
|
||||
# my $context = $self->GetContext;
|
||||
# $self->SetCurrent($context);
|
||||
|
@ -1078,19 +1078,17 @@ sub Destroy {
|
|||
# my @projected = gluUnProject_p($x, $y, $z, @mview, @proj, @viewport);
|
||||
# return Slic3r::Pointf3->new(@projected);
|
||||
#}
|
||||
#==============================================================================================================================
|
||||
|
||||
sub GetContext {
|
||||
my ($self) = @_;
|
||||
return $self->{context} ||= Wx::GLContext->new($self);
|
||||
}
|
||||
|
||||
sub SetCurrent {
|
||||
my ($self, $context) = @_;
|
||||
return $self->SUPER::SetCurrent($context);
|
||||
}
|
||||
|
||||
#==============================================================================================================================
|
||||
#
|
||||
#sub GetContext {
|
||||
# my ($self) = @_;
|
||||
# return $self->{context} ||= Wx::GLContext->new($self);
|
||||
#}
|
||||
#
|
||||
#sub SetCurrent {
|
||||
# my ($self, $context) = @_;
|
||||
# return $self->SUPER::SetCurrent($context);
|
||||
#}
|
||||
#
|
||||
#sub UseVBOs {
|
||||
# my ($self) = @_;
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue