GLBuffer Class

(Qt3DRender::Render::GLBuffer)

Public Types

enum Type { ArrayBuffer, UniformBuffer, IndexBuffer, ShaderStorageBuffer, ..., DrawIndirectBuffer }

Public Functions

GLBuffer()
void allocate(GraphicsContext *ctx, uint size, bool dynamic = true)
void allocate(GraphicsContext *ctx, const void *data, uint size, bool dynamic = true)
bool bind(GraphicsContext *ctx, Type t)
void bindBufferBase(GraphicsContext *ctx, int bindingPoint, Type t)
void bindBufferBase(GraphicsContext *ctx, int bindingPoint)
GLuint bufferId() const
bool create(GraphicsContext *ctx)
void destroy(GraphicsContext *ctx)
QByteArray download(GraphicsContext *ctx, uint size)
bool isBound() const
bool isCreated() const
bool release(GraphicsContext *ctx)
void update(GraphicsContext *ctx, const void *data, uint size, int offset = 0)

Member Type Documentation

enum GLBuffer::Type

Member Function Documentation

GLBuffer::GLBuffer()

Default constructs an instance of GLBuffer.

void GLBuffer::allocate(GraphicsContext *ctx, uint size, bool dynamic = true)

void GLBuffer::allocate(GraphicsContext *ctx, const void *data, uint size, bool dynamic = true)

bool GLBuffer::bind(GraphicsContext *ctx, Type t)

void GLBuffer::bindBufferBase(GraphicsContext *ctx, int bindingPoint, Type t)

void GLBuffer::bindBufferBase(GraphicsContext *ctx, int bindingPoint)

GLuint GLBuffer::bufferId() const

bool GLBuffer::create(GraphicsContext *ctx)

void GLBuffer::destroy(GraphicsContext *ctx)

QByteArray GLBuffer::download(GraphicsContext *ctx, uint size)

bool GLBuffer::isBound() const

bool GLBuffer::isCreated() const

bool GLBuffer::release(GraphicsContext *ctx)

void GLBuffer::update(GraphicsContext *ctx, const void *data, uint size, int offset = 0)