You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
[gles2] fix black bar artifacts
This commit is contained in:
@@ -75,6 +75,7 @@ void RasterizerCanvasGLES2::canvas_begin() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (storage->frame.clear_request) {
|
if (storage->frame.clear_request) {
|
||||||
|
glColorMask(true, true, true, true);
|
||||||
glClearColor(storage->frame.clear_request_color.r,
|
glClearColor(storage->frame.clear_request_color.r,
|
||||||
storage->frame.clear_request_color.g,
|
storage->frame.clear_request_color.g,
|
||||||
storage->frame.clear_request_color.b,
|
storage->frame.clear_request_color.b,
|
||||||
|
|||||||
@@ -392,6 +392,12 @@ void RasterizerGLES2::end_frame(bool p_swap_buffers) {
|
|||||||
OS::get_singleton()->swap_buffers();
|
OS::get_singleton()->swap_buffers();
|
||||||
else
|
else
|
||||||
glFinish();
|
glFinish();
|
||||||
|
|
||||||
|
if (p_swap_buffers) {
|
||||||
|
glColorMask(true, true, true, true);
|
||||||
|
glClearColor(0, 0, 0, 1);
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RasterizerGLES2::finalize() {
|
void RasterizerGLES2::finalize() {
|
||||||
|
|||||||
@@ -3641,6 +3641,7 @@ void RasterizerStorageGLES2::_render_target_allocate(RenderTarget *rt) {
|
|||||||
|
|
||||||
texture_set_flags(rt->texture, texture->flags);
|
texture_set_flags(rt->texture, texture->flags);
|
||||||
|
|
||||||
|
glClearColor(0, 0, 0, 0);
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
// copy texscreen buffers
|
// copy texscreen buffers
|
||||||
|
|||||||
Reference in New Issue
Block a user