class SG_EXPORT osg::TextureRectangle

Texture state class which encapsulates OpenGL texture functionality

Inheritance:


Public Classes

class SubloadCallback: public Referenced

Public Methods

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

Protected Fields

[more]mutable ref_ptr<Image> _image
[more]mutable GLsizei _textureWidth
[more]mutable GLsizei _textureHeight
[more]ref_ptr<SubloadCallback> _subloadCallback
[more]mutable ImageModifiedTag _modifiedTag

Protected Methods

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

Protected

[more]typedef buffered_value<unsigned int> ImageModifiedTag


Inherited from Texture:

Public Classes

oenum WrapParameter
oenum WrapMode
oenum FilterParameter
oenum FilterMode
oenum InternalFormatMode
oenum ShadowCompareFunc
oenum ShadowTextureMode
class SG_EXPORT Extensions: public osg::Referenced
Extensions class which encapsulates the querring of extensions and associated function pointers, and provide convinience wrappers to check for the extensions or use the associated functions
class TextureObject: public osg::Referenced
class SG_EXPORT TextureObjectManager: public osg::Referenced

Public Fields

omutable TextureObjectBuffer _textureObjectBuffer

Public Methods

ovirtual osg::Object* cloneType() const
ovirtual osg::Object* clone(const CopyOp& copyop) const
ovirtual bool isSameKindAs(const osg::Object* obj) const
ovirtual const char* libraryName() const
ovirtual const char* className() const
ovirtual Type getType() const
ovirtual bool isTextureAttribute() const
ovoid setWrap(WrapParameter which, WrapMode wrap)
oWrapMode getWrap(WrapParameter which) const
ovoid setBorderColor(const Vec4& color)
oconst Vec4& getBorderColor() const
ovoid setBorderWidth(GLint width)
oGLint getBorderWidth() const
ovoid setFilter(FilterParameter which, FilterMode filter)
oFilterMode getFilter(FilterParameter which) const
ovoid setMaxAnisotropy(float anis)
oinline float getMaxAnisotropy() const
oinline void setUseHardwareMipMapGeneration(bool useHardwareMipMapGeneration)
oinline bool getUseHardwareMipMapGeneration() const
oinline void setUnRefImageDataAfterApply(bool flag)
oinline bool getUnRefImageDataAfterApply() const
oinline void setClientStorageHint(bool flag)
oinline bool getClientStorageHint() const
oinline void setInternalFormatMode(InternalFormatMode mode)
oinline InternalFormatMode getInternalFormatMode() const
oinline void setInternalFormat(GLint internalFormat)
oinline GLint getInternalFormat() const
obool isCompressedInternalFormat() const
oinline TextureObject* getTextureObject(unsigned int contextID) const
ovoid dirtyTextureObject()
obool areAllTextureObjectsLoaded() const
oinline unsigned int& getTextureParameterDirty(unsigned int contextID) const
ovoid dirtyTextureParameters()
ovoid setShadowComparison(bool flag)
ovoid setShadowCompareFunc(ShadowCompareFunc func)
oShadowCompareFunc getShadowCompareFunc()
ovoid setShadowTextureMode(ShadowTextureMode mode)
oShadowTextureMode getShadowTextureMode()
ovoid setShadowAmbient(float shadow_ambient)
ofloat getShadowAmbient()
ovirtual void compileGLObjects(State& state) const
ovirtual void releaseGLObjects(State* state=0) const
ostatic Extensions* getExtensions(unsigned int contextID, bool createIfNotInitalized)
ostatic void setExtensions(unsigned int contextID, Extensions* extensions)
ovoid applyTexImage2D_load(State& state, GLenum target, const Image* image, GLsizei width, GLsizei height, GLsizei numMipmapLevels) const
ovoid applyTexImage2D_subload(State& state, GLenum target, const Image* image, GLsizei width, GLsizei height, GLint inInternalFormat, GLsizei numMipmapLevels) const
ovoid takeTextureObjects(TextureObjectListMap& toblm)
ostatic void setTextureObjectManager(TextureObjectManager* tom)
ostatic TextureObjectManager* getTextureObjectManager()
ostatic void flushTextureObjects(unsigned int contextID, double currentTime, double& availableTime)

Public

otypedef std::list< ref_ptr<TextureObject> > TextureObjectList
otypedef std::map<unsigned int, TextureObjectList > TextureObjectListMap
otypedef buffered_object< ref_ptr<TextureObject> > TextureObjectBuffer

Protected Fields

omutable TexParameterDirtyList _texParametersDirtyList
oWrapMode _wrap_s
oWrapMode _wrap_t
oWrapMode _wrap_r
oFilterMode _min_filter
oFilterMode _mag_filter
ofloat _maxAnisotropy
obool _useHardwareMipMapGeneration
obool _unrefImageDataAfterApply
obool _clientStorageHint
oVec4 _borderColor
oGLint _borderWidth
oInternalFormatMode _internalFormatMode
omutable GLint _internalFormat
obool _use_shadow_comparison
oShadowCompareFunc _shadow_compare_func
oShadowTextureMode _shadow_texture_mode
ofloat _shadow_ambient

Protected Methods

ovoid computeInternalFormatWithImage(const osg::Image& image) const
ovoid computeRequiredTextureDimensions(State& state, const osg::Image& image, GLsizei& width, GLsizei& height, GLsizei& numMipmapLevels) const
obool isCompressedInternalFormat(GLint internalFormat) const
oint compareTexture(const Texture& rhs) const

Protected

otypedef buffered_value<unsigned int> TexParameterDirtyList


Inherited from StateAttribute:

Public Classes

oenum Values
oenum Types
ostruct ModeUsage

Public Methods

obool operator < (const StateAttribute& rhs) const
obool operator == (const StateAttribute& rhs) const
obool operator != (const StateAttribute& rhs) const

Public

otypedef GLenum GLMode
otypedef unsigned int GLModeValue
otypedef unsigned int OverrideValue
otypedef unsigned int Type


Inherited from Object:

Public Classes

oenum DataVariance

Public Methods

oinline void setDataVariance(DataVariance dv)
oinline DataVariance getDataVariance() const
oinline void setUserData(Referenced* obj)
oinline Referenced* getUserData()
oinline const Referenced* getUserData() const

Protected Fields

oDataVariance _dataVariance
oref_ptr<Referenced> _userData


Inherited from Referenced:

Public Methods

oinline Referenced& operator = (const Referenced&)
ostatic void setDeleteHandler(DeleteHandler* handler)
ostatic DeleteHandler* getDeleteHandler()
oinline void ref() const
oinline void unref_nodelete() const
oinline int referenceCount() const
oinline void unref() const

Protected Fields

omutable OpenThreads::Mutex _refMutex
omutable int _refCount


Documentation

Texture state class which encapsulates OpenGL texture functionality
o TextureRectangle()

o TextureRectangle(Image* image)

o TextureRectangle(const TextureRectangle& text, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy

o META_StateAttribute(osg, TextureRectangle, TEXTURE)

ovirtual int compare(const StateAttribute& rhs) const
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

ovirtual bool getModeUsage(ModeUsage& usage) const

ovoid setImage(Image* image)
Set the texture image.

oImage* getImage()
Get the texture image.

oinline const Image* getImage() const
Get the const texture image.

oinline unsigned int& getModifiedTag(unsigned int contextID) const

ovirtual void setImage(unsigned int, Image* image)
Set the texture image, ignoring face. as there is only one image

ovirtual Image* getImage(unsigned int)
Get the texture image, ignoring face value as there is only one image.

ovirtual const Image* getImage(unsigned int) const
Get the const texture image , ignoring face value as there is only one image.

ovirtual unsigned int getNumImages() const
Get the number of images that can be assigned to the Texture.

oinline void setTextureSize(int width, int height) const
Set the texture width and height. If width or height are zero then the repsective size value is calculated from the source image sizes.

oinline void getTextureSize(int& width, int& height) const
Get the texture subload width.

ovoid setSubloadCallback(SubloadCallback* cb)

oSubloadCallback* getSubloadCallback()

oconst SubloadCallback* getSubloadCallback() const

ovirtual void apply(State& state) const
On first apply (unless already compiled), create and bind the texture, subsequent apply will simple bind to texture

ovirtual ~TextureRectangle()

ovirtual void computeInternalFormat() const

ovoid applyTexParameters(GLenum target, State& state) const

ovoid applyTexImage_load(GLenum target, Image* image, State& state, GLsizei& inwidth, GLsizei& inheight) const

ovoid applyTexImage_subload(GLenum target, Image* image, State& state, GLsizei& inwidth, GLsizei& inheight, GLint& inInternalFormat) const

omutable ref_ptr<Image> _image

omutable GLsizei _textureWidth

omutable GLsizei _textureHeight

oref_ptr<SubloadCallback> _subloadCallback

otypedef buffered_value<unsigned int> ImageModifiedTag

omutable ImageModifiedTag _modifiedTag


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.