summaryrefslogtreecommitdiff
path: root/drivers/gles3/rasterizer_gles3.h
diff options
context:
space:
mode:
authorclayjohn <claynjohn@gmail.com>2022-06-20 21:56:26 -0700
committerclayjohn <claynjohn@gmail.com>2022-10-06 11:24:45 -0700
commit154b9c1c913ee04b603989db8664481d4df1aaee (patch)
tree6cc754761fb942a4931b63e052c583cfd951b112 /drivers/gles3/rasterizer_gles3.h
parent0c23a2cfe3ad897e1e49008629c135764b2c155c (diff)
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.
Diffstat (limited to 'drivers/gles3/rasterizer_gles3.h')
-rw-r--r--drivers/gles3/rasterizer_gles3.h5
1 files changed, 3 insertions, 2 deletions
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();