summaryrefslogtreecommitdiff
path: root/drivers/gles3
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-11-26 15:13:35 -0300
committerGitHub <noreply@github.com>2017-11-26 15:13:35 -0300
commit22415e5a3168b3dee3cf95d0697ca548bf04d8bf (patch)
treee84493b20284d7357d7bea3402f0349bdb06de51 /drivers/gles3
parent9cf44c1c53f03b67143e606ab3d56680d73ac2c9 (diff)
parentd0e09d84f085c5bffdd5ad06d335be20c246e954 (diff)
Merge pull request #12572 from RandomShaper/onion-skinning
Onion skinning
Diffstat (limited to 'drivers/gles3')
-rw-r--r--drivers/gles3/rasterizer_gles3.cpp7
-rw-r--r--drivers/gles3/rasterizer_gles3.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp
index ee61481a86..b34aec089d 100644
--- a/drivers/gles3/rasterizer_gles3.cpp
+++ b/drivers/gles3/rasterizer_gles3.cpp
@@ -352,7 +352,7 @@ void RasterizerGLES3::blit_render_target_to_screen(RID p_render_target, const Re
canvas->canvas_end();
}
-void RasterizerGLES3::end_frame() {
+void RasterizerGLES3::end_frame(bool p_swap_buffers) {
#if 0
canvas->canvas_begin();
@@ -384,7 +384,10 @@ void RasterizerGLES3::end_frame() {
canvas->draw_generic_textured_rect(Rect2(0,0,15,15),Rect2(0,0,1,1));
#endif
- OS::get_singleton()->swap_buffers();
+ if (p_swap_buffers)
+ OS::get_singleton()->swap_buffers();
+ else
+ glFinish();
/* print_line("objects: "+itos(storage->info.render_object_count));
print_line("material chages: "+itos(storage->info.render_material_switch_count));
diff --git a/drivers/gles3/rasterizer_gles3.h b/drivers/gles3/rasterizer_gles3.h
index 4bfec09bf3..c27af7d019 100644
--- a/drivers/gles3/rasterizer_gles3.h
+++ b/drivers/gles3/rasterizer_gles3.h
@@ -59,7 +59,7 @@ public:
virtual void restore_render_target();
virtual void clear_render_target(const Color &p_color);
virtual void blit_render_target_to_screen(RID p_render_target, const Rect2 &p_screen_rect, int p_screen = 0);
- virtual void end_frame();
+ virtual void end_frame(bool p_swap_buffers);
virtual void finalize();
static void make_current();