Modified render order of gizmos
This commit is contained in:
parent
7f542a0f85
commit
5f6a8adf7c
@ -507,6 +507,7 @@ void GLCanvas3D::Bed::_render_prusa(float theta) const
|
|||||||
if (triangles_vcount > 0)
|
if (triangles_vcount > 0)
|
||||||
{
|
{
|
||||||
::glEnable(GL_DEPTH_TEST);
|
::glEnable(GL_DEPTH_TEST);
|
||||||
|
::glDepthMask(GL_FALSE);
|
||||||
|
|
||||||
::glEnable(GL_BLEND);
|
::glEnable(GL_BLEND);
|
||||||
::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
@ -535,6 +536,7 @@ void GLCanvas3D::Bed::_render_prusa(float theta) const
|
|||||||
::glDisable(GL_TEXTURE_2D);
|
::glDisable(GL_TEXTURE_2D);
|
||||||
|
|
||||||
::glDisable(GL_BLEND);
|
::glDisable(GL_BLEND);
|
||||||
|
::glDepthMask(GL_TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2357,7 +2359,6 @@ void GLCanvas3D::render()
|
|||||||
|
|
||||||
// draw scene
|
// draw scene
|
||||||
_render_background();
|
_render_background();
|
||||||
_render_current_gizmo();
|
|
||||||
|
|
||||||
if (is_custom_bed) // untextured bed needs to be rendered before objects
|
if (is_custom_bed) // untextured bed needs to be rendered before objects
|
||||||
{
|
{
|
||||||
@ -2373,6 +2374,7 @@ void GLCanvas3D::render()
|
|||||||
_render_bed(theta);
|
_render_bed(theta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_render_current_gizmo();
|
||||||
_render_cutting_plane();
|
_render_cutting_plane();
|
||||||
|
|
||||||
// draw overlays
|
// draw overlays
|
||||||
|
@ -837,7 +837,7 @@ void GLGizmoScale3D::on_render(const BoundingBoxf3& box) const
|
|||||||
{
|
{
|
||||||
::glEnable(GL_DEPTH_TEST);
|
::glEnable(GL_DEPTH_TEST);
|
||||||
|
|
||||||
Vec3d offset_vec((double)Offset, (double)Offset, (double)Offset);
|
Vec3d offset_vec = (double)Offset * Vec3d::Ones();
|
||||||
|
|
||||||
m_box = BoundingBoxf3(box.min - offset_vec, box.max + offset_vec);
|
m_box = BoundingBoxf3(box.min - offset_vec, box.max + offset_vec);
|
||||||
const Vec3d& center = m_box.center();
|
const Vec3d& center = m_box.center();
|
||||||
|
Loading…
Reference in New Issue
Block a user