mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
Minor improvement, reuse context
This commit is contained in:
@@ -387,7 +387,7 @@ sub Render {
|
|||||||
# prevent calling SetCurrent() when window is not shown yet
|
# prevent calling SetCurrent() when window is not shown yet
|
||||||
return unless $self->IsShownOnScreen;
|
return unless $self->IsShownOnScreen;
|
||||||
return unless my $context = $self->GetContext;
|
return unless my $context = $self->GetContext;
|
||||||
$self->SetCurrent($self->GetContext);
|
$self->SetCurrent($context);
|
||||||
$self->InitGL;
|
$self->InitGL;
|
||||||
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
|||||||
Reference in New Issue
Block a user