diff --git a/src/CRE/render_manager.cpp b/src/CRE/render_manager.cpp index d90ed361..5651eb3e 100644 --- a/src/CRE/render_manager.cpp +++ b/src/CRE/render_manager.cpp @@ -470,50 +470,48 @@ namespace rndr { void RenderManager::pass_clear(render_context* rctx) { gl_state_begin_event("pass_clear"); - if (true/*field_128*/) { + + if (false/*field_128*/) { vec4 clear_color = get_clear_color(); - glClearBufferfv(GL_COLOR, 0, (GLfloat*)&clear_color); + glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); } post_process* pp = &rctx->post_process; if (!sss_data.enable || !sss_data.npr_contour) { pp->set_render_texture(); - if (sprite_manager_get_reqlist_count(2)) { glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClearDepth(1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + gl_state_bind_framebuffer(0); } else { vec4 clear_color = get_clear_color(); glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w); glClearDepth(1.0f); - if (true/*field_128*/) + if (false/*field_128*/) glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); else glClear(GL_DEPTH_BUFFER_BIT); + gl_state_bind_framebuffer(0); } - gl_state_bind_framebuffer(0); } else { + pp->set_render_texture(); if (sprite_manager_get_reqlist_count(2)) { - pp->set_render_texture(); - - vec4 clear_color = 0.0f; glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClear(GL_COLOR_BUFFER_BIT); gl_state_bind_framebuffer(0); } - else if (true/*field_128*/) { - pp->set_render_texture(); - + else if (false/*field_128*/) { vec4 clear_color = get_clear_color(); glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w); glClear(GL_COLOR_BUFFER_BIT); gl_state_bind_framebuffer(0); } } + gl_state_get_error(); gl_state_end_event(); } @@ -799,7 +797,7 @@ namespace rndr { if (multisample && multisample_framebuffer) { glBindFramebuffer(GL_FRAMEBUFFER, multisample_framebuffer); gl_state_enable_multisample(); - glClearColor(0.0, 0.0, 0.0, 0.0); + glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClear(GL_COLOR_BUFFER_BIT); } else diff --git a/src/ReDIVA/render.cpp b/src/ReDIVA/render.cpp index 48845d3b..19f8530f 100644 --- a/src/ReDIVA/render.cpp +++ b/src/ReDIVA/render.cpp @@ -947,7 +947,7 @@ static render_context* render_context_load() { ImGui_ImplOpenGL3_Init("#version 430"); lock_unlock(imgui_context_lock); - clear_color = 0xFF606060; + clear_color = 0xFF000000; set_clear_color = true; rctx->obj_batch.g_blend_color = 1.0f;