class SG_EXPORT osg::TextureCubeMap

TextureCubeMap state class which encapsulates OpenGl texture cubemap functionality

Inheritance:


Public Methods

[more] TextureCubeMap()
[more] TextureCubeMap(const TextureCubeMap& cm, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy
[more] META_StateAttribute(osg, TextureCubeMap, TEXTURE)
[more]virtual int compare(const StateAttribute& rhs) const
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
[more]void setImage(const Face, Image* image)
Set the texture image for specified face.
[more]Image* getImage(const Face)
Get the texture image for specified face.
[more]const Image* getImage(const Face) const
Get the const texture image for specified face.
[more]inline void setTextureSize(const int width, const 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]void setNumMipmapLevels(unsigned int num) const
Set the number of mip map levels the the texture has been created with, should only be called within an osg::Texuture::apply() and custom OpenGL texture load
[more]unsigned int getNumMipmapLevels() const
Get the number of mip map levels the the texture has been created with
[more]virtual void apply(State& state) const
On first apply (unless already compiled), create the minmapped texture and bind it, subsequent apply will simple bind to texture

Public Members

[more]enum Face
class SubloadCallback: public Referenced

Protected Fields

[more]mutable ref_ptr<Image> _images[6]
[more]mutable GLsizei _textureWidth
[more]mutable GLsizei _textureHeight
[more]mutable GLsizei _numMimpmapLevels
[more]ref_ptr<SubloadCallback> _subloadCallback

Protected Methods

[more]virtual ~TextureCubeMap()
[more]bool imagesValid() const
[more]virtual void computeInternalFormat() const


Inherited from Texture:

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 const Type getType() const
ovirtual bool isTextureAttribute() const
ovoid setWrap(const WrapParameter which, const WrapMode wrap)
oconst WrapMode getWrap(const WrapParameter which) const
ovoid setBorderColor(const Vec4& color)
oconst Vec4& borderColor(void) const
ovoid setFilter(const FilterParameter which, const FilterMode filter)
oconst FilterMode getFilter(const FilterParameter which) const
ovoid setMaxAnisotropy(float anis)
oinline float getMaxAnisotropy() const
oinline void setInternalFormatMode(const InternalFormatMode mode)
oinline const InternalFormatMode getInternalFormatMode() const
oinline void setInternalFormat(const int internalFormat)
oinline const int getInternalFormat() const
obool isCompressedInternalFormat() const
oinline GLuint& getTextureObject(const uint contextID) const
oinline uint& getModifiedTag(const uint contextID) const
ovoid dirtyTextureObject()
ostatic void deleteTextureObject(uint contextID, GLuint handle)
ostatic void flushDeletedTextureObjects(uint contextID)
ostatic GLint getMaxTextureSize()
ovirtual void compile(State& state) const

Public Members

oenum WrapParameter
oenum WrapMode
oenum FilterParameter
oenum FilterMode
oenum InternalFormatMode
o Get the handle to the texture object for the current context

Protected Fields

oWrapMode _wrap_s
oWrapMode _wrap_t
oWrapMode _wrap_r
oFilterMode _min_filter
oFilterMode _mag_filter
ofloat _maxAnisotropy
oVec4 _borderColor
omutable bool _texParametersDirty
oInternalFormatMode _internalFormatMode
omutable GLint _internalFormat

Protected Methods

ovoid computeInternalFormatWithImage(osg::Image& image) const
obool isCompressedInternalFormat(GLint internalFormat) const
ovoid applyTexParameters(GLenum target, State& state) const
ovoid applyTexImage2D(GLenum target, Image* image, State& state, GLsizei& width, GLsizei& height, GLsizei& numMimpmapLevels) const
oint compareTexture(const Texture& rhs) const

Protected Members

otypedef std::vector<GLuint> TextureNameList mutable TextureNameList _handleList
otypedef std::vector<uint> ImageModifiedTag mutable ImageModifiedTag _modifiedTag
otypedef std::map<uint,std::set<uint> >static DeletedTextureObjectCache DeletedTextureObjectCache s_deletedTextureObjectCache


Inherited from StateAttribute:

Public Methods

obool operator < (const StateAttribute& rhs) const
obool operator == (const StateAttribute& rhs) const
obool operator != (const StateAttribute& rhs) const
ovirtual void getAssociatedModes(std::vector<GLMode>& ) const

Public Members

otypedef GLenum GLMode
otypedef unsigned int GLModeValue
otypedef unsigned int OverrideValue
oenum Values
otypedef unsigned int Type
oenum Types


Inherited from Object:

Public Methods

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

Public Members

oenum DataVariance

Protected Fields

oDataVariance _dataVariance
oref_ptr<Referenced> _userData


Inherited from Referenced:

Public Methods

oinline Referenced& operator = (Referenced&)
oinline void ref() const
oinline void unref() const
oinline void unref_nodelete() const
oinline const int referenceCount() const

Protected Fields

omutable int _refCount


Documentation

TextureCubeMap state class which encapsulates OpenGl texture cubemap functionality
o TextureCubeMap()

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

o META_StateAttribute(osg, TextureCubeMap, TEXTURE)

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

oenum Face

o POSITIVE_X

o NEGATIVE_X

o POSITIVE_Y

o NEGATIVE_Y

o POSITIVE_Z

o NEGATIVE_Z

ovoid setImage(const Face, Image* image)
Set the texture image for specified face.

oImage* getImage(const Face)
Get the texture image for specified face.

oconst Image* getImage(const Face) const
Get the const texture image for specified face.

oinline void setTextureSize(const int width, const 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

ovoid setNumMipmapLevels(unsigned int num) const
Set the number of mip map levels the the texture has been created with, should only be called within an osg::Texuture::apply() and custom OpenGL texture load

ounsigned int getNumMipmapLevels() const
Get the number of mip map levels the the texture has been created with

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

ovirtual ~TextureCubeMap()

obool imagesValid() const

ovirtual void computeInternalFormat() const

omutable ref_ptr<Image> _images[6]

omutable GLsizei _textureWidth

omutable GLsizei _textureHeight

omutable GLsizei _numMimpmapLevels

oref_ptr<SubloadCallback> _subloadCallback


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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