#include <bufferobject.hpp>


Public Member Functions | |
| BufferObject (GLenum t=GL_ARRAY_BUFFER, GLenum u=GL_STATIC_DRAW) | |
| Default constructor. | |
| BufferObject (const Size< Dim > &_size, GLenum t=GL_ARRAY_BUFFER, GLenum u=GL_STATIC_DRAW) | |
| Constructor. | |
| BufferObject (const Layout< Type, Dim > &layout, GLenum t=GL_ARRAY_BUFFER, GLenum u=GL_STATIC_DRAW) | |
| Constructor. | |
| void | alloc () |
| Allocate buffer memory. | |
| void | alloc (const Size< Dim > &_size) |
| Allocate buffer memory. | |
| void | bind () |
| Bind the buffer object to the target specified in the constructor. | |
| void | bind (GLenum t) |
| Bind the buffer object to the given target. | |
| void | connect () |
| Register and map buffer object. | |
| void | disconnect () |
| Unmap and unregister buffer object. | |
| void | registerObject () |
| Register abuffer object. | |
| void | unregisterObject () |
| Unregister buffer object. | |
| void | mapBuffer () |
| Map buffer object. | |
| void | unmapBuffer () |
| Unmap buffer object. | |
| void | free () |
| Free buffer memory. | |
| void | unbind () |
| Unbind the buffer object from the target specified in the constructor. | |
Static Public Member Functions | |
| static void | unbind (GLenum t) |
| Unbind the buffer object from the given target. | |
| Cuda::OpenGL::BufferObject< Type, Dim >::BufferObject | ( | GLenum | t = GL_ARRAY_BUFFER, |
|
| GLenum | u = GL_STATIC_DRAW | |||
| ) | [inline] |
Default constructor.
| t | target to which the buffer object is bound | |
| u | usage pattern of the data store |
| Cuda::OpenGL::BufferObject< Type, Dim >::BufferObject | ( | const Size< Dim > & | _size, | |
| GLenum | t = GL_ARRAY_BUFFER, |
|||
| GLenum | u = GL_STATIC_DRAW | |||
| ) | [inline] |
Constructor.
| _size | requested size of memory block. | |
| t | target to which the buffer object is bound | |
| u | usage pattern of the data store |
| Cuda::OpenGL::BufferObject< Type, Dim >::BufferObject | ( | const Layout< Type, Dim > & | layout, | |
| GLenum | t = GL_ARRAY_BUFFER, |
|||
| GLenum | u = GL_STATIC_DRAW | |||
| ) | [inline] |
Constructor.
| layout | requested size of memory block. | |
| t | target to which the buffer object is bound | |
| u | usage pattern of the data store |
| void Cuda::OpenGL::BufferObject< Type, Dim >::alloc | ( | const Size< Dim > & | _size | ) | [inline] |
| void Cuda::OpenGL::BufferObject< Type, Dim >::bind | ( | GLenum | t | ) | [inline] |
Bind the buffer object to the given target.
| t | target to which the buffer object should be bound |
| void Cuda::OpenGL::BufferObject< Type, Dim >::connect | ( | ) | [inline] |
Register and map buffer object.
If you called disconnect(), this must be called before using the buffer memory in a CUDA kernel.
| void Cuda::OpenGL::BufferObject< Type, Dim >::disconnect | ( | ) | [inline] |
Unmap and unregister buffer object.
This must be called before accessing the buffer memory in OpenGL, e.g., copying the buffer data from or to a texture.
| void Cuda::OpenGL::BufferObject< Type, Dim >::registerObject | ( | ) | [inline] |
Register abuffer object.
If you called disconnect() or unregister, this must be called before using the buffer memory in a CUDA kernel.
| void Cuda::OpenGL::BufferObject< Type, Dim >::unregisterObject | ( | ) | [inline] |
Unregister buffer object.
This must be called before accessing the buffer memory in OpenGL for writing, e.g., copying the buffer data from a texture.
| void Cuda::OpenGL::BufferObject< Type, Dim >::mapBuffer | ( | ) | [inline] |
| void Cuda::OpenGL::BufferObject< Type, Dim >::unmapBuffer | ( | ) | [inline] |
| static void Cuda::OpenGL::BufferObject< Type, Dim >::unbind | ( | GLenum | t | ) | [inline, static] |
Unbind the buffer object from the given target.
| t | target from which the buffer object should be unbound |
1.5.6