diff options
author | romulox_x <romulox_x@yahoo.com> | 2015-02-21 13:57:12 -0800 |
---|---|---|
committer | romulox_x <romulox_x@yahoo.com> | 2015-02-21 13:57:12 -0800 |
commit | 2ac767b1f52f2d5d9d6b2dc00e8c3d065b9fc9bb (patch) | |
tree | 28b4493652dc3d66f87aa913b33761ff4bd92167 /servers/visual/visual_server_raster.cpp | |
parent | 1d7337ba10ad593f0786d3e356cf0b05aa9be2b4 (diff) |
changed viewport clearing to use the alpha value of the clear color, and made the transparent bg option of viewport force a clear color of 0,0,0,0
Diffstat (limited to 'servers/visual/visual_server_raster.cpp')
-rw-r--r-- | servers/visual/visual_server_raster.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index 764a969e77..feb14d8a9d 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -6641,7 +6641,12 @@ void VisualServerRaster::_draw_viewport(Viewport *p_viewport,int p_ofs_x, int p_ //clear the viewport black because of no camera? i seriously should.. if (p_viewport->render_target_clear_on_new_frame || p_viewport->render_target_clear) { - rasterizer->clear_viewport(clear_color); + if (p_viewport->transparent_bg) { + rasterizer->clear_viewport(Color(0,0,0,0)); + } + else { + rasterizer->clear_viewport(clear_color); + } p_viewport->render_target_clear=false; } } |