OpenSceneGraph  3.4.0
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
osg::TextureBuffer Class Reference

Encapsulates OpenGL texture buffer functionality. More...

Inheritance diagram for osg::TextureBuffer:
Inheritance graph
[legend]

List of all members.

Classes

class  TextureBufferObject

Public Member Functions

 TextureBuffer ()
 TextureBuffer (Image *image)
 TextureBuffer (const TextureBuffer &text, const CopyOp &copyop=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.
ImagegetImage ()
 Gets the texture image.
const ImagegetImage () 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 ImagegetImage (unsigned int)
 Gets the texture image, ignoring face.
virtual const ImagegetImage (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

Detailed Description

Encapsulates OpenGL texture buffer functionality.


Member Typedef Documentation

typedef buffered_value<unsigned int> osg::TextureBuffer::ImageModifiedCount [protected]

Constructor & Destructor Documentation

Copy constructor using CopyOp to manage deep vs shallow copy.

virtual osg::TextureBuffer::~TextureBuffer ( ) [protected, virtual]

Member Function Documentation

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.

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]

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 
)

Member Data Documentation

GLsizei osg::TextureBuffer::_textureWidth [mutable, protected]
GLenum osg::TextureBuffer::_usageHint [protected]

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

osg logo
Generated at Tue Dec 8 2015 00:14:26 for the OpenSceneGraph by doxygen 1.7.6.1.