Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Rodrigo Faselli
2026-05-18 14:04:45 -03:00
committed by GitHub
parent 6166a54808
commit e2a0ebec0b
4 changed files with 5 additions and 6 deletions

View File

@@ -7641,8 +7641,8 @@ void GLCanvas3D::_render_ssao_pass(unsigned int width, unsigned int height)
if (m_ssao_depth_texture_id == 0) {
glsafe(::glGenTextures(1, &m_ssao_depth_texture_id));
glsafe(::glBindTexture(GL_TEXTURE_2D, m_ssao_depth_texture_id));
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR));
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR));
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST));
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST));
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE));
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE));
}
@@ -8059,7 +8059,7 @@ void GLCanvas3D::_render_objects(GLVolumeCollection::ERenderType type, bool with
if (shader != nullptr) {
shader->start_using();
const bool phong_ssao = wxGetApp().app_config->get_bool(SETTING_OPENGL_PHONG_SSAO);
const bool phong_ssao = wxGetApp().app_config != nullptr && wxGetApp().app_config->get_bool(SETTING_OPENGL_PHONG_SSAO);
shader->set_uniform("enable_ssao", phong_ssao);
const Size& cvn_size = get_canvas_size();