class methods
allocate()
void ofBufferObject::allocate()
Documentation from code comments
creates a buffer without allocating any memory yet glGenBuffers, allocates a GL buffer
allocate(...)
void ofBufferObject::allocate(GLsizeiptr bytes, GLenum usage)
Documentation from code comments
creates a buffer and allocates the required number of bytes glGenBuffers + glNamedBufferData: https://www.opengl.org/sdk/docs/man4/html/glBufferData.xhtml before GL 4.5 emulates glNamedBufferData by binding to last known target for this buffer uploading data to that target and unbinding again
bind(...)
void ofBufferObject::bind(GLenum target)
Documentation from code comments
glBindBuffer: https://www.opengl.org/sdk/docs/man4/html/glBindBuffer.xhtml
bindBase(...)
void ofBufferObject::bindBase(GLenum target, GLuint index)
Documentation from code comments
glBindBufferBase: https://www.opengl.org/sdk/docs/man4/html/glBindBufferBase.xhtml
bindRange(...)
void ofBufferObject::bindRange(GLenum target, GLuint index, GLintptr offset, GLsizeiptr size)
Documentation from code comments
glBindBufferRange: https://www.opengl.org/sdk/docs/man4/html/glBindBufferRange.xhtml
copyTo(...)
void ofBufferObject::copyTo(ofBufferObject &dstBuffer, int readOffset, int writeOffset, size_t size)
getId()
GLuint ofBufferObject::getId()
Documentation from code comments
returns the id of the buffer if it's allocated or 0 otherwise
isAllocated()
bool ofBufferObject::isAllocated()
Documentation from code comments
true if allocate was called before
map(...)
void * ofBufferObject::map(GLenum access)
Documentation from code comments
glMapNamedBuffer: https://www.opengl.org/sdk/docs/man4/html/glMapBuffer.xhtml before GL 4.5 emulates glMapNamedBuffer by binding to last known target for this buffer and mapping that target
map(...)
T * ofBufferObject::map(GLenum access)
Documentation from code comments
typed version of map, returns an array of T when used like:
buffer.map
mapRange(...)
void * ofBufferObject::mapRange(GLintptr offset, GLsizeiptr length, GLenum access)
Documentation from code comments
glMapNamedBufferRange: https://www.opengl.org/sdk/docs/man4/html/glMapBufferRange.xhtml before GL 4.5 emulates glMapNamedBufferRange by binding to last known target for this buffer and mapping that target
mapRange(...)
T * ofBufferObject::mapRange(GLintptr offset, GLsizeiptr length, GLenum access)
Documentation from code comments
typed version of mapRange, returns an array of T when used like:
buffer.mapRange
setData(...)
void ofBufferObject::setData(GLsizeiptr bytes, const void *data, GLenum usage)
Documentation from code comments
glNamedBufferData: https://www.opengl.org/sdk/docs/man4/html/glBufferData.xhtml before GL 4.5 emulates glNamedBufferData by binding to last known target for this buffer uploading data to that target and unbinding again
setData(...)
void ofBufferObject::setData(const vector< T > &data, GLenum usage)
Documentation from code comments
typed version of setData, same functionality but guesses the size from the size of the passed vector and size of the type
unbind(...)
void ofBufferObject::unbind(GLenum target)
Documentation from code comments
binds the passed target to buffer 0
unbindBase(...)
void ofBufferObject::unbindBase(GLenum target, GLuint index)
Documentation from code comments
binds the given target and index to buffer 0
unbindRange(...)
void ofBufferObject::unbindRange(GLenum target, GLuint index)
Documentation from code comments
binds the given target and index to 0
unmap()
void ofBufferObject::unmap()
Documentation from code comments
glUnmapNamedBuffer: https://www.opengl.org/sdk/docs/man4/html/glUnmapBuffer.xhtml before GL 4.5 emulates glUnmapNamedBuffer by unmapping and unbinding the last known target for this buffer
unmapRange()
void ofBufferObject::unmapRange()
Documentation from code comments
same as unmap, just to make the api more clear
updateData(...)
void ofBufferObject::updateData(GLintptr offset, GLsizeiptr bytes, const void *data)
Documentation from code comments
glNamedBufferSubData: https://www.opengl.org/sdk/docs/man4/html/glBufferSubData.xhtml before GL 4.5 emulates glNamedBufferSubData by binding to last known target for this buffer uploading data to that target and unbinding again
updateData(...)
void ofBufferObject::updateData(GLintptr offset, const vector< T > &data)
Documentation from code comments
typed version of updateData, same functionality but guesses the size from the size of the passed vector and size of the type
updateData(...)
void ofBufferObject::updateData(const vector< T > &data)
Documentation from code comments
typed version of updateData, same functionality but guesses the size from the size of the passed vector and size of the type
Last updated Tuesday, 19 November 2024 17:25:28 UTC - 2537ee49f6d46d5fe98e408849448314fd1f180e
If you have any doubt about the usage of this module you can ask in the forum.
If you want to contribute better documentation or start documenting this section you can do so here
If you find anything wrong with this docs you can report any error by opening an issue