Cinder  0.9.1
Public Member Functions | Static Public Member Functions | List of all members
cinder::gl::BufferTexture Class Reference

#include <BufferTexture.h>

Inherits cinder::Noncopyable.

Public Member Functions

 ~BufferTexture ()
 
void bindTexture (uint8_t textureUnit=0)
 
void unbindTexture (uint8_t textureUnit=0)
 
void setBuffer (const BufferObjRef &buffer, GLenum internalFormat)
 
GLuint getId ()
 
GLenum getTarget ()
 
GLint getInternalFormat ()
 
BufferObjRefgetBufferObj ()
 
const BufferObjRefgetBufferObj () const
 

Static Public Member Functions

static BufferTextureRef create (const BufferObjRef &buffer, GLenum internalFormat)
 
static BufferTextureRef create (const void *data, size_t numBytes, GLenum internalFormat, GLenum usage=GL_STATIC_DRAW)
 

Detailed Description

Represents a Buffer Texture, or GL_TEXTURE_BUFFER.

Constructor & Destructor Documentation

cinder::gl::BufferTexture::~BufferTexture ( )

Member Function Documentation

BufferTextureRef cinder::gl::BufferTexture::create ( const BufferObjRef buffer,
GLenum  internalFormat 
)
static

Creates and returns a shared BufferTexture object according to internalFormat.

BufferTextureRef cinder::gl::BufferTexture::create ( const void *  data,
size_t  numBytes,
GLenum  internalFormat,
GLenum  usage = GL_STATIC_DRAW 
)
static

Creates and returns a shared BufferTexture object according to internalFormat, initialized with data of size numBytes.

void cinder::gl::BufferTexture::bindTexture ( uint8_t  textureUnit = 0)

Binds the associated Texture representation of your BufferObj.

void cinder::gl::BufferTexture::unbindTexture ( uint8_t  textureUnit = 0)

Unbinds the associated Texture representation of your BufferObj.

void cinder::gl::BufferTexture::setBuffer ( const BufferObjRef buffer,
GLenum  internalFormat 
)

Sets the ossociated BufferObj and its internal format.

GLuint cinder::gl::BufferTexture::getId ( )

Returns the gl system id for this BufferTexture.

GLenum cinder::gl::BufferTexture::getTarget ( )

Returns the target for the Buffer Texture. GL_TEXTURE_BUFFER is the only allowable target.

GLint cinder::gl::BufferTexture::getInternalFormat ( )

Returns the internal format of the Buffer Texture. It represents the way your BufferObj data is built.

BufferObjRef& cinder::gl::BufferTexture::getBufferObj ( )

Returns the BufferObj associated with this BufferTexture.

const BufferObjRef& cinder::gl::BufferTexture::getBufferObj ( ) const

Returns the BufferObj associated with this BufferTexture.


The documentation for this class was generated from the following files: