mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-09 22:09:10 +08:00
Fixed 3D view of the Cut dialog.
This commit is contained in:
parent
40b75f6cee
commit
95b45da57c
@ -33,6 +33,7 @@ use Slic3r::Geometry qw(PI);
|
|||||||
__PACKAGE__->mk_accessors( qw(_quat _dirty init
|
__PACKAGE__->mk_accessors( qw(_quat _dirty init
|
||||||
enable_picking
|
enable_picking
|
||||||
enable_moving
|
enable_moving
|
||||||
|
use_plain_shader
|
||||||
on_viewport_changed
|
on_viewport_changed
|
||||||
on_hover
|
on_hover
|
||||||
on_select
|
on_select
|
||||||
@ -132,6 +133,7 @@ sub new {
|
|||||||
$self->_stheta(45);
|
$self->_stheta(45);
|
||||||
$self->_sphi(45);
|
$self->_sphi(45);
|
||||||
$self->_zoom(1);
|
$self->_zoom(1);
|
||||||
|
$self->use_plain_shader(0);
|
||||||
|
|
||||||
# Collection of GLVolume objects
|
# Collection of GLVolume objects
|
||||||
$self->volumes(Slic3r::GUI::_3DScene::GLVolume::Collection->new);
|
$self->volumes(Slic3r::GUI::_3DScene::GLVolume::Collection->new);
|
||||||
@ -1206,7 +1208,7 @@ sub Render {
|
|||||||
glEnable(GL_LIGHTING);
|
glEnable(GL_LIGHTING);
|
||||||
|
|
||||||
# draw objects
|
# draw objects
|
||||||
if ($self->enable_picking) {
|
if (! $self->use_plain_shader) {
|
||||||
$self->draw_volumes;
|
$self->draw_volumes;
|
||||||
} elsif ($self->UseVBOs) {
|
} elsif ($self->UseVBOs) {
|
||||||
$self->{plain_shader}->enable if $self->{plain_shader};
|
$self->{plain_shader}->enable if $self->{plain_shader};
|
||||||
|
@ -18,6 +18,7 @@ sub new {
|
|||||||
|
|
||||||
# init GUI elements
|
# init GUI elements
|
||||||
my $canvas = Slic3r::GUI::3DScene->new($self);
|
my $canvas = Slic3r::GUI::3DScene->new($self);
|
||||||
|
$canvas->use_plain_shader(1);
|
||||||
$self->canvas($canvas);
|
$self->canvas($canvas);
|
||||||
my $slider_low = Wx::Slider->new(
|
my $slider_low = Wx::Slider->new(
|
||||||
$self, -1,
|
$self, -1,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user