diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2015-09-18 12:59:13 +0100 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2015-10-13 12:12:49 +0000 |
commit | b1810f91ee5eaa3ae9e79efde6b4a0335738c3e8 (patch) | |
tree | 5a5d8b2894110b76840521a1e1be8669e165038b /src/render/io | |
parent | ba3d49872eb5f7fdb3eca10ae923dda7b7a218d8 (diff) |
Remove Q prefix from graphics helpers
Change-Id: I79066df0df1fbac4f49e47c91c552fca0d4093bf
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/io')
-rw-r--r-- | src/render/io/uniformbuffer.cpp | 12 | ||||
-rw-r--r-- | src/render/io/uniformbuffer_p.h | 14 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/render/io/uniformbuffer.cpp b/src/render/io/uniformbuffer.cpp index 5dd8989fb..458a7ac4d 100644 --- a/src/render/io/uniformbuffer.cpp +++ b/src/render/io/uniformbuffer.cpp @@ -35,7 +35,7 @@ ****************************************************************************/ #include "uniformbuffer_p.h" -#include <private/qgraphicscontext_p.h> +#include <private/graphicscontext_p.h> #if !defined(GL_UNIFORM_BUFFER) #define GL_UNIFORM_BUFFER 0x8A11 @@ -56,19 +56,19 @@ UniformBuffer::UniformBuffer() { } -void UniformBuffer::create(QGraphicsContext *ctx) +void UniformBuffer::create(GraphicsContext *ctx) { ctx->openGLContext()->functions()->glGenBuffers(1, &m_bufferId); m_isCreated = true; } -void UniformBuffer::destroy(QGraphicsContext *ctx) +void UniformBuffer::destroy(GraphicsContext *ctx) { ctx->openGLContext()->functions()->glDeleteBuffers(1, &m_bufferId); m_isCreated = false; } -void UniformBuffer::allocate(QGraphicsContext *ctx, uint size, bool dynamic) +void UniformBuffer::allocate(GraphicsContext *ctx, uint size, bool dynamic) { ctx->openGLContext()->functions()->glBindBuffer(GL_UNIFORM_BUFFER, m_bufferId); // Either GL_STATIC_DRAW OR GL_DYNAMIC_DRAW depending on the use case @@ -77,14 +77,14 @@ void UniformBuffer::allocate(QGraphicsContext *ctx, uint size, bool dynamic) ctx->openGLContext()->functions()->glBindBuffer(GL_UNIFORM_BUFFER, 0); } -void UniformBuffer::update(QGraphicsContext *ctx, const void *data, uint size, int offset) +void UniformBuffer::update(GraphicsContext *ctx, const void *data, uint size, int offset) { ctx->openGLContext()->functions()->glBindBuffer(GL_UNIFORM_BUFFER, m_bufferId); ctx->openGLContext()->functions()->glBufferSubData(GL_UNIFORM_BUFFER, offset, size, data); ctx->openGLContext()->functions()->glBindBuffer(GL_UNIFORM_BUFFER, 0); } -void UniformBuffer::bindToUniformBlock(QGraphicsContext *ctx, int bindingPoint) +void UniformBuffer::bindToUniformBlock(GraphicsContext *ctx, int bindingPoint) { ctx->bindBufferBase(GL_UNIFORM_BUFFER, bindingPoint, m_bufferId); } diff --git a/src/render/io/uniformbuffer_p.h b/src/render/io/uniformbuffer_p.h index 6d489c248..77f09e579 100644 --- a/src/render/io/uniformbuffer_p.h +++ b/src/render/io/uniformbuffer_p.h @@ -46,7 +46,7 @@ namespace Qt3DRender { namespace Render { -class QGraphicsContext; +class GraphicsContext; typedef QPair<Qt3D::QNodeId, Qt3D::QNodeId> ShaderDataShaderUboKey; @@ -55,12 +55,12 @@ class UniformBuffer public: UniformBuffer(); - void bind(QGraphicsContext *ctx); - void create(QGraphicsContext *ctx); - void destroy(QGraphicsContext *ctx); - void allocate(QGraphicsContext *ctx, uint size, bool dynamic = true); - void update(QGraphicsContext *ctx, const void *data, uint size, int offset = 0); - void bindToUniformBlock(QGraphicsContext *ctx, int bindingPoint); + void bind(GraphicsContext *ctx); + void create(GraphicsContext *ctx); + void destroy(GraphicsContext *ctx); + void allocate(GraphicsContext *ctx, uint size, bool dynamic = true); + void update(GraphicsContext *ctx, const void *data, uint size, int offset = 0); + void bindToUniformBlock(GraphicsContext *ctx, int bindingPoint); inline GLuint bufferId() const { return m_bufferId; } inline bool isCreated() const { return m_isCreated; } |