mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-18 20:28:08 -06:00
Workaround for buggy Intel HD Graphics OpenGL drivers:
Fall back to OpenGL 1.1 by a "use_legacy_opengl" preferences switch. https://github.com/prusa3d/Slic3r/issues/233 https://github.com/prusa3d/Slic3r/issues/268 https://github.com/prusa3d/Slic3r/issues/619
This commit is contained in:
parent
61e6f23ed2
commit
743fc9dbd0
3 changed files with 24 additions and 2 deletions
|
@ -15,7 +15,7 @@ package Slic3r::GUI::3DScene::Base;
|
|||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Wx qw(:timer :bitmap :icon :dialog);
|
||||
use Wx qw(wxTheApp :timer :bitmap :icon :dialog);
|
||||
use Wx::Event qw(EVT_PAINT EVT_SIZE EVT_ERASE_BACKGROUND EVT_IDLE EVT_MOUSEWHEEL EVT_MOUSE_EVENTS EVT_CHAR EVT_TIMER);
|
||||
# must load OpenGL *before* Wx::GLCanvas
|
||||
use OpenGL qw(:glconstants :glfunctions :glufunctions :gluconstants);
|
||||
|
@ -956,6 +956,16 @@ sub UseVBOs {
|
|||
my ($self) = @_;
|
||||
|
||||
if (! defined ($self->{use_VBOs})) {
|
||||
my $use_legacy = wxTheApp->{app_config}->get('use_legacy_opengl');
|
||||
if ($use_legacy eq '1') {
|
||||
# Disable OpenGL 2.0 rendering.
|
||||
$self->{use_VBOs} = 0;
|
||||
# Don't enable the layer editing tool.
|
||||
$self->{layer_editing_enabled} = 0;
|
||||
# 2 means failed
|
||||
$self->{layer_editing_initialized} = 2;
|
||||
return 0;
|
||||
}
|
||||
# This is a special path for wxWidgets on GTK, where an OpenGL context is initialized
|
||||
# first when an OpenGL widget is shown for the first time. How ugly.
|
||||
return 0 if (! $self->init && $^O eq 'linux');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue