Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

osg::TextureRectangle Class Reference

Texture state class which encapsulates OpenGL texture functionality. More...

Inheritance diagram for osg::TextureRectangle:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 TextureRectangle ()
 TextureRectangle (Image *image)
 TextureRectangle (const TextureRectangle &text, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 Copy constructor using CopyOp to manage deep vs shallow copy.
 META_StateAttribute (osg, TextureRectangle, TEXTURE)
virtual int compare (const StateAttribute &rhs) const
 Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
virtual bool getModeUsage (ModeUsage &usage) const
 Return the modes associated with this StateAttribute.
void setImage (Image *image)
 Set the texture image.
ImagegetImage ()
 Get the texture image.
const ImagegetImage () const
 Get the const texture image.
unsigned int & getModifiedTag (unsigned int contextID) const
virtual void setImage (unsigned int, Image *image)
 Set the texture image, ignoring face value as there is only one image.
virtual ImagegetImage (unsigned int)
 Get the texture image, ignoring face value as there is only one image.
virtual const ImagegetImage (unsigned int) const
 Get the const texture image, ignoring face value as there is only one image.
virtual unsigned int getNumImages () const
 Get the number of images that can be assigned to the Texture.
void setTextureSize (int width, int height) const
 Set the texture width and height.
void getTextureSize (int &width, int &height) const
 Get the texture subload width.
void setSubloadCallback (SubloadCallback *cb)
SubloadCallbackgetSubloadCallback ()
const SubloadCallbackgetSubloadCallback () const
virtual void apply (State &state) const
 On first apply (unless already compiled), create and bind the texture, subsequent apply will simply bind to texture.

Protected Types

typedef buffered_value< unsigned
int > 
ImageModifiedTag

Protected Member Functions

virtual ~TextureRectangle ()
virtual void computeInternalFormat () const
void applyTexParameters (GLenum target, State &state) const
 Helper method.
void applyTexImage_load (GLenum target, Image *image, State &state, GLsizei &inwidth, GLsizei &inheight) const
void applyTexImage_subload (GLenum target, Image *image, State &state, GLsizei &inwidth, GLsizei &inheight, GLint &inInternalFormat) const

Protected Attributes

ref_ptr< Image_image
GLsizei _textureWidth
GLsizei _textureHeight
ref_ptr< SubloadCallback_subloadCallback
ImageModifiedTag _modifiedTag

Classes

class  SubloadCallback

Detailed Description

Texture state class which encapsulates OpenGL texture functionality.


Member Typedef Documentation

typedef buffered_value<unsigned int> osg::TextureRectangle::ImageModifiedTag [protected]
 


Constructor & Destructor Documentation

TextureRectangle::TextureRectangle  ) 
 

TextureRectangle::TextureRectangle Image image  ) 
 

TextureRectangle::TextureRectangle const TextureRectangle text,
const CopyOp copyop = CopyOp::SHALLOW_COPY
 

Copy constructor using CopyOp to manage deep vs shallow copy.

TextureRectangle::~TextureRectangle  )  [protected, virtual]
 


Member Function Documentation

void TextureRectangle::apply State state  )  const [virtual]
 

On first apply (unless already compiled), create and bind the texture, subsequent apply will simply bind to texture.

Implements osg::Texture.

void TextureRectangle::applyTexImage_load GLenum  target,
Image image,
State state,
GLsizei &  inwidth,
GLsizei &  inheight
const [protected]
 

void TextureRectangle::applyTexImage_subload GLenum  target,
Image image,
State state,
GLsizei &  inwidth,
GLsizei &  inheight,
GLint inInternalFormat
const [protected]
 

void TextureRectangle::applyTexParameters GLenum  target,
State state
const [protected]
 

Helper method.

Sets texture paramters.

Reimplemented from osg::Texture.

int TextureRectangle::compare const StateAttribute rhs  )  const [virtual]
 

Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.

Implements osg::StateAttribute.

void TextureRectangle::computeInternalFormat  )  const [protected, virtual]
 

Implements osg::Texture.

virtual const Image* osg::TextureRectangle::getImage unsigned  int  )  const [inline, virtual]
 

Get the const texture image, ignoring face value as there is only one image.

Implements osg::Texture.

virtual Image* osg::TextureRectangle::getImage unsigned  int  )  [inline, virtual]
 

Get the texture image, ignoring face value as there is only one image.

Implements osg::Texture.

const Image* osg::TextureRectangle::getImage  )  const [inline]
 

Get the const texture image.

Image* osg::TextureRectangle::getImage  )  [inline]
 

Get the texture image.

virtual bool osg::TextureRectangle::getModeUsage ModeUsage &  usage  )  const [inline, virtual]
 

Return the modes associated with this StateAttribute.

Reimplemented from osg::StateAttribute.

unsigned int& osg::TextureRectangle::getModifiedTag unsigned int  contextID  )  const [inline]
 

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

Get the number of images that can be assigned to the Texture.

Implements osg::Texture.

const SubloadCallback* osg::TextureRectangle::getSubloadCallback  )  const [inline]
 

SubloadCallback* osg::TextureRectangle::getSubloadCallback  )  [inline]
 

void osg::TextureRectangle::getTextureSize int &  width,
int &  height
const [inline]
 

Get the texture subload width.

osg::TextureRectangle::META_StateAttribute osg  ,
TextureRectangle  ,
TEXTURE 
 

virtual void osg::TextureRectangle::setImage unsigned  int,
Image image
[inline, virtual]
 

Set the texture image, ignoring face value as there is only one image.

Implements osg::Texture.

void TextureRectangle::setImage Image image  ) 
 

Set the texture image.

void osg::TextureRectangle::setSubloadCallback SubloadCallback cb  )  [inline]
 

void osg::TextureRectangle::setTextureSize int  width,
int  height
const [inline]
 

Set the texture width and height.

If width or height are zero then the repsective size value is calculated from the source image sizes.


Member Data Documentation

ref_ptr<Image> osg::TextureRectangle::_image [mutable, protected]
 

ImageModifiedTag osg::TextureRectangle::_modifiedTag [mutable, protected]
 

ref_ptr<SubloadCallback> osg::TextureRectangle::_subloadCallback [protected]
 

GLsizei osg::TextureRectangle::_textureHeight [mutable, protected]
 

GLsizei osg::TextureRectangle::_textureWidth [mutable, protected]
 


The documentation for this class was generated from the following files:
Generated at Thu Oct 13 09:03:20 2005 for the OpenSceneGraph by doxygen 1.4.1.