diff options
author | clayjohn <claynjohn@gmail.com> | 2022-06-20 21:56:26 -0700 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2022-10-06 11:24:45 -0700 |
commit | 154b9c1c913ee04b603989db8664481d4df1aaee (patch) | |
tree | 6cc754761fb942a4931b63e052c583cfd951b112 /servers/rendering/dummy | |
parent | 0c23a2cfe3ad897e1e49008629c135764b2c155c (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 'servers/rendering/dummy')
-rw-r--r-- | servers/rendering/dummy/rasterizer_dummy.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/servers/rendering/dummy/rasterizer_dummy.h b/servers/rendering/dummy/rasterizer_dummy.h index d867114384..0fde97e395 100644 --- a/servers/rendering/dummy/rasterizer_dummy.h +++ b/servers/rendering/dummy/rasterizer_dummy.h @@ -51,6 +51,7 @@ class RasterizerDummy : public RendererCompositor { private: uint64_t frame = 1; double delta = 0; + double time = 0.0; protected: RasterizerCanvasDummy canvas; @@ -82,6 +83,7 @@ public: void begin_frame(double frame_step) override { frame++; delta = frame_step; + time += frame_step; } void prepare_for_blitting_render_targets() override {} @@ -106,6 +108,7 @@ public: uint64_t get_frame_number() const override { return frame; } double get_frame_delta_time() const override { return delta; } + double get_total_time() const override { return time; } RasterizerDummy() {} ~RasterizerDummy() {} |