OpenSceneGraph
3.4.0
|
Encapsulates OpenGL texture buffer functionality. More...
Classes | |
class | TextureBufferObject |
Public Member Functions | |
TextureBuffer () | |
TextureBuffer (Image *image) | |
TextureBuffer (const TextureBuffer &text, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
Copy constructor using CopyOp to manage deep vs shallow copy. | |
META_StateAttribute (osg, TextureBuffer, TEXTURE) | |
virtual int | compare (const StateAttribute &rhs) const |
Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. | |
virtual GLenum | getTextureTarget () const |
void | setImage (Image *image) |
Sets the texture image. | |
Image * | getImage () |
Gets the texture image. | |
const Image * | getImage () const |
Gets the const texture image. | |
unsigned int & | getModifiedCount (unsigned int contextID) const |
virtual void | setImage (unsigned int, Image *image) |
Sets the texture image, ignoring face. | |
virtual Image * | getImage (unsigned int) |
Gets the texture image, ignoring face. | |
virtual const Image * | getImage (unsigned int) const |
Gets the const texture image, ignoring face. | |
virtual unsigned int | getNumImages () const |
Gets the number of images that can be assigned to the Texture. | |
void | setTextureWidth (int width) |
Sets the texture width. | |
virtual int | getTextureWidth () const |
Gets the texture width. | |
virtual int | getTextureHeight () const |
virtual int | getTextureDepth () const |
void | setUsageHint (GLenum usageHint) |
GLenum | getUsageHint () const |
virtual void | allocateMipmap (State &) const |
Allocate mipmap levels of the texture by subsequent calling of glTexImage* function. | |
virtual void | apply (State &state) const |
Bind the texture buffer. | |
void | bindBufferAs (unsigned int contextID, GLenum target) |
Bind buffer to different target. | |
void | unbindBufferAs (unsigned int contextID, GLenum target) |
Protected Types | |
typedef buffered_value < unsigned int > | ImageModifiedCount |
typedef osg::buffered_object < osg::ref_ptr < TextureBufferObject > > | TextureBufferObjectList |
Protected Member Functions | |
virtual | ~TextureBuffer () |
virtual void | computeInternalFormat () const |
Protected Attributes | |
ref_ptr< Image > | _image |
GLsizei | _textureWidth |
GLenum | _usageHint |
ImageModifiedCount | _modifiedCount |
TextureBufferObjectList | _textureBufferObjects |
Encapsulates OpenGL texture buffer functionality.
typedef buffered_value<unsigned int> osg::TextureBuffer::ImageModifiedCount [protected] |
typedef osg::buffered_object<osg::ref_ptr<TextureBufferObject> > osg::TextureBuffer::TextureBufferObjectList [protected] |
osg::TextureBuffer::TextureBuffer | ( | Image * | image | ) |
osg::TextureBuffer::TextureBuffer | ( | const TextureBuffer & | text, |
const CopyOp & | copyop = CopyOp::SHALLOW_COPY |
||
) |
Copy constructor using CopyOp to manage deep vs shallow copy.
virtual osg::TextureBuffer::~TextureBuffer | ( | ) | [protected, virtual] |
virtual void osg::TextureBuffer::allocateMipmap | ( | State & | state | ) | const [inline, virtual] |
Allocate mipmap levels of the texture by subsequent calling of glTexImage* function.
Implements osg::Texture.
virtual void osg::TextureBuffer::apply | ( | State & | state | ) | const [virtual] |
Bind the texture buffer.
Implements osg::Texture.
void osg::TextureBuffer::bindBufferAs | ( | unsigned int | contextID, |
GLenum | target | ||
) |
Bind buffer to different target.
virtual int osg::TextureBuffer::compare | ( | const StateAttribute & | rhs | ) | const [virtual] |
Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
Implements osg::StateAttribute.
virtual void osg::TextureBuffer::computeInternalFormat | ( | ) | const [protected, virtual] |
Implements osg::Texture.
Image* osg::TextureBuffer::getImage | ( | ) | [inline] |
Gets the texture image.
const Image* osg::TextureBuffer::getImage | ( | ) | const [inline] |
Gets the const texture image.
virtual Image* osg::TextureBuffer::getImage | ( | unsigned int | ) | [inline, virtual] |
Gets the texture image, ignoring face.
Implements osg::Texture.
virtual const Image* osg::TextureBuffer::getImage | ( | unsigned int | ) | const [inline, virtual] |
Gets the const texture image, ignoring face.
Implements osg::Texture.
unsigned int& osg::TextureBuffer::getModifiedCount | ( | unsigned int | contextID | ) | const [inline] |
virtual unsigned int osg::TextureBuffer::getNumImages | ( | ) | const [inline, virtual] |
Gets the number of images that can be assigned to the Texture.
Implements osg::Texture.
virtual int osg::TextureBuffer::getTextureDepth | ( | ) | const [inline, virtual] |
Reimplemented from osg::Texture.
virtual int osg::TextureBuffer::getTextureHeight | ( | ) | const [inline, virtual] |
Reimplemented from osg::Texture.
virtual GLenum osg::TextureBuffer::getTextureTarget | ( | ) | const [inline, virtual] |
Implements osg::Texture.
References GL_TEXTURE_BUFFER.
virtual int osg::TextureBuffer::getTextureWidth | ( | ) | const [inline, virtual] |
Gets the texture width.
Reimplemented from osg::Texture.
GLenum osg::TextureBuffer::getUsageHint | ( | ) | const [inline] |
void osg::TextureBuffer::setImage | ( | Image * | image | ) |
Sets the texture image.
virtual void osg::TextureBuffer::setImage | ( | unsigned int | , |
Image * | image | ||
) | [inline, virtual] |
Sets the texture image, ignoring face.
Implements osg::Texture.
References setImage().
Referenced by setImage().
void osg::TextureBuffer::setTextureWidth | ( | int | width | ) | [inline] |
Sets the texture width.
If width is zero, calculate the value from the source image width.
void osg::TextureBuffer::setUsageHint | ( | GLenum | usageHint | ) | [inline] |
void osg::TextureBuffer::unbindBufferAs | ( | unsigned int | contextID, |
GLenum | target | ||
) |
ref_ptr<Image> osg::TextureBuffer::_image [protected] |
ImageModifiedCount osg::TextureBuffer::_modifiedCount [mutable, protected] |
TextureBufferObjectList osg::TextureBuffer::_textureBufferObjects [mutable, protected] |
GLsizei osg::TextureBuffer::_textureWidth [mutable, protected] |
GLenum osg::TextureBuffer::_usageHint [protected] |
![]() | Generated at Tue Dec 8 2015 00:14:26 for the OpenSceneGraph by doxygen 1.7.6.1. |