mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 23:23:59 -06:00
Some incomplete work for interactive part editor
This commit is contained in:
parent
fd43ada293
commit
3f4f27fa5d
3 changed files with 45 additions and 11 deletions
|
@ -18,6 +18,7 @@ __PACKAGE__->mk_accessors( qw(quat dirty init mview_init
|
|||
|
||||
use constant TRACKBALLSIZE => 0.8;
|
||||
use constant TURNTABLE_MODE => 1;
|
||||
use constant SELECTED_COLOR => [0,1,0];
|
||||
use constant COLORS => [ [1,1,1], [1,0.5,0.5], [0.5,1,0.5], [0.5,0.5,1] ];
|
||||
|
||||
sub new {
|
||||
|
@ -447,7 +448,11 @@ sub draw_mesh {
|
|||
|
||||
glCullFace(GL_BACK);
|
||||
glNormalPointer_p($volume->{norms});
|
||||
glColor3f(@{ $volume->{color} });
|
||||
if ($volume->{selected}) {
|
||||
glColor3f(@{ &SELECTED_COLOR });
|
||||
} else {
|
||||
glColor3f(@{ $volume->{color} });
|
||||
}
|
||||
glDrawArrays(GL_TRIANGLES, 0, $volume->{verts}->elements / 3);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue