FIX: face culling related issue

jira: STUDIO-10822

Change-Id: Iea7c9f663b1a93c447032c20a8e4a600ad94a9bb
This commit is contained in:
jun.zhang 2025-03-12 15:12:31 +08:00 committed by lane.wei
parent 77dc987ad5
commit 18eac7a79b
2 changed files with 7 additions and 1 deletions

View File

@ -1639,8 +1639,12 @@ void GLVolumeCollection::render(GUI::ERenderPipelineStage render_pip
}
glsafe(::glCullFace(GL_BACK));
if (disable_cullface)
if (disable_cullface) {
glsafe(::glDisable(GL_CULL_FACE));
}
else {
glsafe(::glEnable(GL_CULL_FACE));
}
auto camera = GUI::wxGetApp().plater()->get_camera();
for (GLVolumeWithIdAndZ& volume : to_render) {

View File

@ -2970,6 +2970,8 @@ void ImGuiWrapper::render_draw_data(ImDrawData *draw_data)
}
glsafe(::glDisable(GL_SCISSOR_TEST));
glsafe(::glEnable(GL_CULL_FACE));
glsafe(::glEnable(GL_DEPTH_TEST));
wxGetApp().unbind_shader();