From 154b9c1c913ee04b603989db8664481d4df1aaee Mon Sep 17 00:00:00 2001 From: clayjohn Date: Mon, 20 Jun 2022 21:56:26 -0700 Subject: Use a giant UBO to optimize performance in 2D This removes the countless small UBO writes we had before and replaces them with a single large write per render pass. This results in much faster rendering on low-end devices but improves speed on all devices. --- drivers/gles3/rasterizer_gles3.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/gles3/rasterizer_gles3.h') diff --git a/drivers/gles3/rasterizer_gles3.h b/drivers/gles3/rasterizer_gles3.h index 97543af0d5..431515fd0d 100644 --- a/drivers/gles3/rasterizer_gles3.h +++ b/drivers/gles3/rasterizer_gles3.h @@ -103,8 +103,9 @@ public: low_end = true; } - uint64_t get_frame_number() const { return frame; } - double get_frame_delta_time() const { return delta; } + _ALWAYS_INLINE_ uint64_t get_frame_number() const { return frame; } + _ALWAYS_INLINE_ double get_frame_delta_time() const { return delta; } + _ALWAYS_INLINE_ double get_total_time() const { return time_total; } RasterizerGLES3(); ~RasterizerGLES3(); -- cgit v1.2.3