From 9757fc354cc4c1052f7023b2d1613a5333cc0cd2 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 17 Jun 2017 08:58:57 -0300 Subject: Fix transparent background rendering, closes #8703 Properly implemented UPDATE_WHEN_VISIBLE mode for viewports --- drivers/gles3/rasterizer_storage_gles3.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'drivers/gles3/rasterizer_storage_gles3.cpp') diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 509b14a22e..c697672bd8 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -6060,10 +6060,20 @@ void RasterizerStorageGLES3::render_target_set_flag(RID p_render_target, RenderT default: {} } } +bool RasterizerStorageGLES3::render_target_was_used(RID p_render_target) { -bool RasterizerStorageGLES3::render_target_renedered_in_frame(RID p_render_target) { + RenderTarget *rt = render_target_owner.getornull(p_render_target); + ERR_FAIL_COND_V(!rt, false); - return false; + return rt->used_in_frame; +} + +void RasterizerStorageGLES3::render_target_clear_used(RID p_render_target) { + + RenderTarget *rt = render_target_owner.getornull(p_render_target); + ERR_FAIL_COND(!rt); + + rt->used_in_frame = false; } void RasterizerStorageGLES3::render_target_set_msaa(RID p_render_target, VS::ViewportMSAA p_msaa) { -- cgit v1.2.3