Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_save_command
This commit is contained in:
commit
306fbffdc0
5
deps/CMakeLists.txt
vendored
5
deps/CMakeLists.txt
vendored
@ -57,6 +57,11 @@ set(PATCH_CMD ${GIT_EXECUTABLE} apply --verbose --ignore-space-change --whitespa
|
|||||||
|
|
||||||
get_property(_is_multi GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
get_property(_is_multi GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||||
|
|
||||||
|
if (NOT _is_multi AND NOT CMAKE_BUILD_TYPE)
|
||||||
|
set(CMAKE_BUILD_TYPE Release)
|
||||||
|
message(STATUS "Forcing CMAKE_BUILD_TYPE to Release as it was not specified.")
|
||||||
|
endif ()
|
||||||
|
|
||||||
function(prusaslicer_add_cmake_project projectname)
|
function(prusaslicer_add_cmake_project projectname)
|
||||||
cmake_parse_arguments(P_ARGS "" "INSTALL_DIR;BUILD_COMMAND;INSTALL_COMMAND" "CMAKE_ARGS" ${ARGN})
|
cmake_parse_arguments(P_ARGS "" "INSTALL_DIR;BUILD_COMMAND;INSTALL_COMMAND" "CMAKE_ARGS" ${ARGN})
|
||||||
|
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
#version 110
|
#version 110
|
||||||
|
|
||||||
|
const float EPSILON = 0.0001;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
|
gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
|
||||||
|
// Values inside depth buffer for fragments of the contour of a selected area are offset
|
||||||
|
// by small epsilon to solve z-fighting between painted triangles and contour lines.
|
||||||
|
gl_FragDepth = gl_FragCoord.z - EPSILON;
|
||||||
}
|
}
|
||||||
|
@ -630,7 +630,11 @@ void TriangleSelectorMmGui::render(ImGuiWrapper *imgui)
|
|||||||
|
|
||||||
auto *contour_shader = wxGetApp().get_shader("mm_contour");
|
auto *contour_shader = wxGetApp().get_shader("mm_contour");
|
||||||
contour_shader->start_using();
|
contour_shader->start_using();
|
||||||
|
|
||||||
|
glsafe(::glDepthFunc(GL_LEQUAL));
|
||||||
m_gizmo_scene.render_contour();
|
m_gizmo_scene.render_contour();
|
||||||
|
glsafe(::glDepthFunc(GL_LESS));
|
||||||
|
|
||||||
contour_shader->stop_using();
|
contour_shader->stop_using();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -725,10 +729,6 @@ void GLMmSegmentationGizmo3DScene::render(size_t triangle_indices_idx) const
|
|||||||
assert(this->vertices_VBO_id != 0);
|
assert(this->vertices_VBO_id != 0);
|
||||||
assert(this->triangle_indices_VBO_ids[triangle_indices_idx] != 0);
|
assert(this->triangle_indices_VBO_ids[triangle_indices_idx] != 0);
|
||||||
|
|
||||||
ScopeGuard offset_fill_guard([]() { glsafe(::glDisable(GL_POLYGON_OFFSET_FILL)); });
|
|
||||||
glsafe(::glEnable(GL_POLYGON_OFFSET_FILL));
|
|
||||||
glsafe(::glPolygonOffset(5.0, 5.0));
|
|
||||||
|
|
||||||
glsafe(::glBindBuffer(GL_ARRAY_BUFFER, this->vertices_VBO_id));
|
glsafe(::glBindBuffer(GL_ARRAY_BUFFER, this->vertices_VBO_id));
|
||||||
glsafe(::glVertexPointer(3, GL_FLOAT, 3 * sizeof(float), (const void*)(0 * sizeof(float))));
|
glsafe(::glVertexPointer(3, GL_FLOAT, 3 * sizeof(float), (const void*)(0 * sizeof(float))));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user