diff options
author | Paul Lemire <paul.lemire350@gmail.com> | 2015-09-19 18:23:22 +0200 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2015-10-14 13:27:13 +0000 |
commit | 05902cb5bd821e9aaa851af1619ecef91f61cd6f (patch) | |
tree | 383646573a664ac75ddf803dc077be6cff385d18 /src/render/io/uniformbuffer_p.h | |
parent | bd10ed192e7496186281cef137e474eccae46e67 (diff) |
Uniform Buffers: try to minimize bind / unbind
Change-Id: I52c7d3fd3ff50211f2869df7e81e70ca1475d245
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Diffstat (limited to 'src/render/io/uniformbuffer_p.h')
-rw-r--r-- | src/render/io/uniformbuffer_p.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/render/io/uniformbuffer_p.h b/src/render/io/uniformbuffer_p.h index 49db79f51..e60d30054 100644 --- a/src/render/io/uniformbuffer_p.h +++ b/src/render/io/uniformbuffer_p.h @@ -67,6 +67,7 @@ public: UniformBuffer(); void bind(GraphicsContext *ctx); + void release(GraphicsContext *ctx); void create(GraphicsContext *ctx); void destroy(GraphicsContext *ctx); void allocate(GraphicsContext *ctx, uint size, bool dynamic = true); @@ -75,10 +76,12 @@ public: inline GLuint bufferId() const { return m_bufferId; } inline bool isCreated() const { return m_isCreated; } + inline bool isBound() const { return m_bound; } private: GLuint m_bufferId; bool m_isCreated; + bool m_bound; }; } // namespace Render |