OpenSceneGraph  3.4.0
Public Member Functions | Protected Member Functions | Protected Attributes
osg::Texture2DMultisample Class Reference

Texture2DMultisample state class which encapsulates OpenGL 2D multisampled texture functionality. More...

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

List of all members.

Public Member Functions

 Texture2DMultisample ()
 Texture2DMultisample (GLsizei numSamples, GLboolean fixedsamplelocations)
 Texture2DMultisample (const Texture2DMultisample &text, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 Copy constructor using CopyOp to manage deep vs shallow copy.
 META_StateAttribute (osg, Texture2DMultisample, 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
virtual bool getModeUsage (StateAttribute::ModeUsage &) const
 Texture2DMultisample is related to non fixed pipeline usage only so isn't appropriate to enable/disable.
void setTextureSize (int width, int height) const
 Sets the texture width and height.
void setNumSamples (int samples)
GLsizei getNumSamples () const
virtual void setImage (unsigned int, Image *)
 Sets the texture image for the specified face.
virtual ImagegetImage (unsigned int)
 Gets the texture image for the specified face.
virtual const ImagegetImage (unsigned int) const
 Gets the const texture image for specified face.
virtual unsigned int getNumImages () const
 Gets the number of images that can be assigned to this Texture.
virtual void allocateMipmap (State &) const
 Allocate mipmap levels of the texture by subsequent calling of glTexImage* function.
void setTextureWidth (int width)
void setTextureHeight (int height)
virtual int getTextureWidth () const
virtual int getTextureHeight () const
virtual int getTextureDepth () const
virtual void apply (State &state) const
 Bind the texture object.

Protected Member Functions

virtual ~Texture2DMultisample ()
virtual void computeInternalFormat () const

Protected Attributes

GLsizei _textureWidth
 Subloaded images can have different texture and image sizes.
GLsizei _textureHeight
GLsizei _numSamples
GLboolean _fixedsamplelocations

Detailed Description

Texture2DMultisample state class which encapsulates OpenGL 2D multisampled texture functionality.

Multisampled texture were introduced with OpenGL 3.1 and extension GL_ARB_texture_multisample. See http://www.opengl.org/registry/specs/ARB/texture_multisample.txt for more info.


Constructor & Destructor Documentation

osg::Texture2DMultisample::Texture2DMultisample ( GLsizei  numSamples,
GLboolean  fixedsamplelocations 
)

Copy constructor using CopyOp to manage deep vs shallow copy.

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

Member Function Documentation

virtual void osg::Texture2DMultisample::allocateMipmap ( State state) const [inline, virtual]

Allocate mipmap levels of the texture by subsequent calling of glTexImage* function.

Implements osg::Texture.

virtual void osg::Texture2DMultisample::apply ( State state) const [virtual]

Bind the texture object.

If the texture object hasn't already been compiled, create the texture mipmap levels.

Implements osg::Texture.

virtual int osg::Texture2DMultisample::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::Texture2DMultisample::computeInternalFormat ( ) const [protected, virtual]

Implements osg::Texture.

virtual Image* osg::Texture2DMultisample::getImage ( unsigned  face) [inline, virtual]

Gets the texture image for the specified face.

Implements osg::Texture.

References NULL.

virtual const Image* osg::Texture2DMultisample::getImage ( unsigned  face) const [inline, virtual]

Gets the const texture image for specified face.

Implements osg::Texture.

References NULL.

virtual bool osg::Texture2DMultisample::getModeUsage ( StateAttribute::ModeUsage ) const [inline, virtual]

Texture2DMultisample is related to non fixed pipeline usage only so isn't appropriate to enable/disable.

Reimplemented from osg::Texture.

virtual unsigned int osg::Texture2DMultisample::getNumImages ( ) const [inline, virtual]

Gets the number of images that can be assigned to this Texture.

Implements osg::Texture.

GLsizei osg::Texture2DMultisample::getNumSamples ( ) const [inline]
virtual int osg::Texture2DMultisample::getTextureDepth ( ) const [inline, virtual]

Reimplemented from osg::Texture.

virtual int osg::Texture2DMultisample::getTextureHeight ( ) const [inline, virtual]

Reimplemented from osg::Texture.

virtual GLenum osg::Texture2DMultisample::getTextureTarget ( ) const [inline, virtual]

Implements osg::Texture.

References GL_TEXTURE_2D_MULTISAMPLE.

virtual int osg::Texture2DMultisample::getTextureWidth ( ) const [inline, virtual]

Reimplemented from osg::Texture.

virtual void osg::Texture2DMultisample::setImage ( unsigned  face,
Image image 
) [inline, virtual]

Sets the texture image for the specified face.

Implements osg::Texture.

void osg::Texture2DMultisample::setTextureSize ( int  width,
int  height 
) const [inline]

Sets the texture width and height.

If width or height are zero, calculate the respective value from the source image size.


Member Data Documentation

GLboolean osg::Texture2DMultisample::_fixedsamplelocations [mutable, protected]
GLsizei osg::Texture2DMultisample::_numSamples [mutable, protected]
GLsizei osg::Texture2DMultisample::_textureHeight [mutable, protected]
GLsizei osg::Texture2DMultisample::_textureWidth [mutable, protected]

Subloaded images can have different texture and image sizes.


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

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