mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 20:15:55 +08:00
Show bed numbers when the camera is below the bed
This commit is contained in:
parent
f8dc44d12c
commit
32b5cfb1f5
@ -171,7 +171,9 @@ void Bed3D::render(GLCanvas3D& canvas, const Transform3d& view_matrix, const Tra
|
||||
shader->set_uniform("projection_matrix", projection_matrix);
|
||||
glsafe(::glEnable(GL_BLEND));
|
||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
||||
glsafe(glDepthMask(GL_FALSE));
|
||||
glsafe(::glDepthMask(GL_FALSE));
|
||||
const bool old_cullface = ::glIsEnabled(GL_CULL_FACE);
|
||||
glsafe(::glDisable(GL_CULL_FACE));
|
||||
glsafe(::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));
|
||||
glsafe(::glBindTexture(GL_TEXTURE_2D, m_digits_texture->get_id()));
|
||||
|
||||
@ -195,7 +197,9 @@ void Bed3D::render(GLCanvas3D& canvas, const Transform3d& view_matrix, const Tra
|
||||
m_digits_models[i + 1]->render();
|
||||
}
|
||||
glsafe(::glBindTexture(GL_TEXTURE_2D, 0));
|
||||
glsafe(glDepthMask(GL_TRUE));
|
||||
if (old_cullface)
|
||||
glsafe(::glEnable(GL_CULL_FACE));
|
||||
glsafe(::glDepthMask(GL_TRUE));
|
||||
glsafe(::glDisable(GL_DEPTH_TEST));
|
||||
shader->stop_using();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user