osg::Texture2DArray Class Reference

`#include <Texture2DArray>`

Inheritance diagram for osg::Texture2DArray:

## Classes

class | SubloadCallback

## Public Member Functions

| Texture2DArray ()
| Texture2DArray (const Texture2DArray &cm, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
| META_StateAttribute (osg, Texture2DArray, TEXTURE)
virtual int | compare (const StateAttribute &rhs) const
virtual GLenum | getTextureTarget () const
virtual bool | getModeUsage (StateAttribute::ModeUsage &) const
virtual void | setImage (unsigned int layer, Image *image)
template<class T>
void | setImage (unsigned int layer, const ref_ptr< T > &image)
virtual Image * | getImage (unsigned int layer)
virtual const Image * | getImage (unsigned int layer) const
virtual unsigned int | getNumImages () const
virtual bool | isDirty (unsigned int contextID) const
unsigned int & | getModifiedCount (unsigned int layer, unsigned int contextID) const
void | setTextureSize (int width, int height, int depth)
void | setTextureWidth (int width)
void | setTextureHeight (int height)
void | setTextureDepth (int depth)
virtual int | getTextureWidth () const
virtual int | getTextureHeight () const
virtual int | getTextureDepth () const
void | setSubloadCallback (SubloadCallback *cb)
SubloadCallback * | getSubloadCallback ()
const SubloadCallback * | getSubloadCallback () const
void | setNumMipmapLevels (unsigned int num) const
unsigned int | getNumMipmapLevels () const
void | copyTexSubImage2DArray (State &state, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height)
virtual void | apply (State &state) const
Public Member Functions inherited from osg::Texture
| Texture ()
| Texture (const Texture &text, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
virtual osg::Object * | cloneType () const =0
virtual osg::Object * | clone (const CopyOp &copyop) const =0
virtual bool | isSameKindAs (const osg::Object *obj) const
virtual const char * | libraryName () const
virtual const char * | className () const
virtual Texture * | asTexture ()
virtual const Texture * | asTexture () const
virtual Type | getType () const
virtual bool | isTextureAttribute () const
void | setWrap (WrapParameter which, WrapMode wrap)
WrapMode | getWrap (WrapParameter which) const
void | setBorderColor (const Vec4d &color)
const Vec4d & | getBorderColor () const
void | setBorderWidth (GLint width)
GLint | getBorderWidth () const
void | setFilter (FilterParameter which, FilterMode filter)
FilterMode | getFilter (FilterParameter which) const
void | setMaxAnisotropy (float anis)
float | getMaxAnisotropy () const
void | setMinLOD (float minlod)
float | getMinLOD () const
void | setMaxLOD (float maxlod)
float | getMaxLOD () const
void | setLODBias (float lodbias)
float | getLODBias () const
void | setSwizzle (const Vec4i &swizzle)
const Vec4i & | getSwizzle () const
void | setUseHardwareMipMapGeneration (bool useHardwareMipMapGeneration)
bool | getUseHardwareMipMapGeneration () const
void | setUnRefImageDataAfterApply (bool flag)
bool | getUnRefImageDataAfterApply () const
void | setClientStorageHint (bool flag)
bool | getClientStorageHint () const
void | setResizeNonPowerOfTwoHint (bool flag)
bool | getResizeNonPowerOfTwoHint () const
void | setInternalFormatMode (InternalFormatMode mode)
InternalFormatMode | getInternalFormatMode () const
void | setInternalFormat (GLint internalFormat)
GLint | getInternalFormat () const
bool | isCompressedInternalFormat () const
void | setSourceFormat (GLenum sourceFormat)
GLenum | getSourceFormat () const
void | setSourceType (GLenum sourceType)
GLenum | getSourceType () const
InternalFormatType | getInternalFormatType () const
GLenum | selectSizedInternalFormat (const osg::Image *image=0) const
TextureObject * | getTextureObject (unsigned int contextID) const
void | setTextureObject (unsigned int contextID, TextureObject *to)
void | dirtyTextureObject ()
bool | areAllTextureObjectsLoaded () const
unsigned int & | getTextureParameterDirty (unsigned int contextID) const
void | dirtyTextureParameters ()
void | allocateMipmapLevels ()
void | setShadowComparison (bool flag)
bool | getShadowComparison () const
void | setShadowCompareFunc (ShadowCompareFunc func)
ShadowCompareFunc | getShadowCompareFunc () const
void | setShadowTextureMode (ShadowTextureMode mode)
ShadowTextureMode | getShadowTextureMode () const
void | setShadowAmbient (float shadow_ambient)
float | getShadowAmbient () const
template<class T>
void | setImage (unsigned int face, const ref_ptr< T > &image)
void | setReadPBuffer (GraphicsContext *context)
template<class T>
void | setReadPBuffer (const ref_ptr< T > &context)
GraphicsContext * | getReadPBuffer ()
const GraphicsContext * | getReadPBuffer () const
virtual void | compileGLObjects (State &state) const
virtual void | resizeGLObjectBuffers (unsigned int maxSize)
virtual void | releaseGLObjects (State *state=0) const
void | applyTexImage2D_load (State &state, GLenum target, const Image *image, GLsizei width, GLsizei height, GLsizei numMipmapLevels) const
void | applyTexImage2D_subload (State &state, GLenum target, const Image *image, GLsizei width, GLsizei height, GLint inInternalFormat, GLsizei numMipmapLevels) const
TextureObject * | generateAndAssignTextureObject (unsigned int contextID, GLenum target) const
TextureObject * | generateAndAssignTextureObject (unsigned int contextID, GLenum target, GLint numMipmapLevels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border) const
Public Member Functions inherited from osg::StateAttribute
| StateAttribute ()
| StateAttribute (const StateAttribute &sa, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
virtual StateAttribute * | asStateAttribute ()
virtual const StateAttribute * | asStateAttribute () const
virtual unsigned int | getMember () const
TypeMemberPair | getTypeMemberPair () const
bool | operator< (const StateAttribute &rhs) const
bool | operator== (const StateAttribute &rhs) const
bool | operator!= (const StateAttribute &rhs) const
const ParentList & | getParents () const
StateSet * | getParent (unsigned int i)
const StateSet * | getParent (unsigned int i) const
unsigned int | getNumParents () const
void | setShaderComponent (ShaderComponent *sc)
ShaderComponent * | getShaderComponent ()
const ShaderComponent * | getShaderComponent () const
virtual bool | checkValidityOfAssociatedModes (osg::State &) const
void | setUpdateCallback (StateAttributeCallback *uc)
StateAttributeCallback * | getUpdateCallback ()
const StateAttributeCallback * | getUpdateCallback () const
void | setEventCallback (StateAttributeCallback *ec)
StateAttributeCallback * | getEventCallback ()
const StateAttributeCallback * | getEventCallback () const
Public Member Functions inherited from osg::Object
| Object ()
| Object (bool threadSafeRefUnref)
| Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
std::string | getCompoundClassName () const
virtual Node * | asNode ()
virtual const Node * | asNode () const
virtual NodeVisitor * | asNodeVisitor ()
virtual const NodeVisitor * | asNodeVisitor () const
virtual StateSet * | asStateSet ()
virtual const StateSet * | asStateSet () const
virtual Uniform * | asUniform ()
virtual const Uniform * | asUniform () const
virtual Camera * | asCamera ()
virtual const Camera * | asCamera () const
virtual Drawable * | asDrawable ()
virtual const Drawable * | asDrawable () const
virtual Callback * | asCallback ()
virtual const Callback * | asCallback () const
virtual CallbackObject * | asCallbackObject ()
virtual const CallbackObject * | asCallbackObject () const
virtual UserDataContainer * | asUserDataContainer ()
virtual const UserDataContainer * | asUserDataContainer () const
virtual ValueObject * | asValueObject ()
virtual const ValueObject * | asValueObject () const
virtual Image * | asImage ()
virtual const Image * | asImage () const
virtual void | setThreadSafeRefUnref (bool threadSafe)
virtual void | setName (const std::string &name)
void | setName (const char *name)
const std::string & | getName () const
void | setDataVariance (DataVariance dv)
DataVariance | getDataVariance () const
virtual void | computeDataVariance ()
void | setUserDataContainer (osg::UserDataContainer *udc)
template<class T>
void | setUserDataContainer (const ref_ptr< T > &udc)
osg::UserDataContainer * | getUserDataContainer ()
const osg::UserDataContainer * | getUserDataContainer () const
osg::UserDataContainer * | getOrCreateUserDataContainer ()
virtual void | setUserData (Referenced *obj)
template<class T>
void | setUserData (const ref_ptr< T > &ud)
virtual Referenced * | getUserData ()
virtual const Referenced * | getUserData () const
template<typename T>
bool | getUserValue (const std::string &name, T &value) const
template<typename T>
void | setUserValue (const std::string &name, const T &value)
template<typename T>
BoolValueObject UCharValueObject UShortValueObject UIntValueObject DoubleValueObject Vec3fValueObject Vec2dValueObject Vec4dValueObject PlaneValueObject MatrixdValueObject BoundingBoxdValueObject BoundingSpheredValueObject bool | getUserValue (const std::string &name, T &value) const
Public Member Functions inherited from osg::Referenced
| Referenced ()
| Referenced (bool threadSafeRefUnref)
| Referenced (const Referenced &)
Referenced & | operator= (const Referenced &)
bool | getThreadSafeRefUnref () const
OpenThreads::Mutex * | getRefMutex () const
int | ref () const
int | unref () const
int | unref_nodelete () const
int | referenceCount () const
ObserverSet * | getObserverSet () const
ObserverSet * | getOrCreateObserverSet () const
void | addObserver (Observer *observer) const
void | removeObserver (Observer *observer) const

## Protected Types

typedef std::vector< ref_ptr< Image > > | Images
typedef buffered_value< unsigned int > | ImageModifiedCount
Protected Types inherited from osg::Texture
typedef buffered_value< unsigned int > | TexParameterDirtyList
typedef buffered_object< ref_ptr< TextureObject > > | TextureObjectBuffer

## Protected Member Functions

virtual | ~Texture2DArray ()
bool | imagesValid () const
virtual void | computeInternalFormat () const
GLsizei | computeTextureDepth () const
void | allocateMipmap (State &state) const
void | applyTexImage2DArray_subload (State &state, Image *image, GLsizei layer, GLsizei inwidth, GLsizei inheight, GLsizei indepth, GLint inInternalFormat, GLsizei &numMipmapLevels) const
Protected Member Functions inherited from osg::Texture
virtual | ~Texture ()
void | computeInternalFormatWithImage (const osg::Image &image) const
void | computeRequiredTextureDimensions (State &state, const osg::Image &image, GLsizei &width, GLsizei &height, GLsizei &numMipmapLevels) const
void | computeInternalFormatType () const
void | applyTexParameters (GLenum target, State &state) const
bool | isHardwareMipmapGenerationEnabled (const State &state) const
bool | isSafeToUnrefImageData (const State &state) const
GenerateMipmapMode | mipmapBeforeTexImage (const State &state, bool hardwareMipmapOn) const
void | mipmapAfterTexImage (State &state, GenerateMipmapMode beforeResult) const
void | generateMipmap (State &state) const
int | compareTexture (const Texture &rhs) const
int | compareTextureObjects (const Texture &rhs) const
Protected Member Functions inherited from osg::StateAttribute
virtual | ~StateAttribute ()
void | addParent (osg::StateSet *object)
void | removeParent (osg::StateSet *object)
Protected Member Functions inherited from osg::Object
virtual | ~Object ()
Protected Member Functions inherited from osg::Referenced
virtual | ~Referenced ()
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const
void | deleteUsingDeleteHandler () const

## Protected Attributes

Images | _images
GLsizei | _textureWidth
GLsizei | _textureHeight
GLsizei | _textureDepth
GLsizei | _numMipmapLevels
ref_ptr< SubloadCallback > | _subloadCallback
std::vector< ImageModifiedCount > | _modifiedCount
Protected Attributes inherited from osg::Texture
TexParameterDirtyList | _texParametersDirtyList
TexParameterDirtyList | _texMipmapGenerationDirtyList
WrapMode | _wrap_s
WrapMode | _wrap_t
WrapMode | _wrap_r
FilterMode | _min_filter
FilterMode | _mag_filter
float | _maxAnisotropy
float | _minlod
float | _maxlod
float | _lodbias
Vec4i | _swizzle
bool | _useHardwareMipMapGeneration
bool | _unrefImageDataAfterApply
bool | _clientStorageHint
bool | _resizeNonPowerOfTwoHint
Vec4d | _borderColor
GLint | _borderWidth
InternalFormatMode | _internalFormatMode
InternalFormatType | _internalFormatType
GLint | _internalFormat
GLenum | _sourceFormat
GLenum | _sourceType
bool | _use_shadow_comparison
ShadowCompareFunc | _shadow_compare_func
ShadowTextureMode | _shadow_texture_mode
float | _shadow_ambient
TextureObjectBuffer | _textureObjectBuffer
ref_ptr< GraphicsContext > | _readPBuffer
Protected Attributes inherited from osg::StateAttribute
ParentList | _parents
ref_ptr< ShaderComponent > | _shaderComponent
ref_ptr< StateAttributeCallback > | _updateCallback
ref_ptr< StateAttributeCallback > | _eventCallback
Protected Attributes inherited from osg::Object
std::string | _name
DataVariance | _dataVariance
osg::UserDataContainer * | _userDataContainer
Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr | _observerSet
OpenThreads::Atomic | _refCount

## Additional Inherited Members

Public Types inherited from osg::Texture
enum | WrapParameter { WRAP_S , WRAP_T , WRAP_R }
enum | WrapMode { CLAMP = GL_CLAMP , CLAMP_TO_EDGE = GL_CLAMP_TO_EDGE , CLAMP_TO_BORDER = GL_CLAMP_TO_BORDER_ARB , REPEAT = GL_REPEAT , MIRROR = GL_MIRRORED_REPEAT_IBM }
enum | FilterParameter { MIN_FILTER , MAG_FILTER }
enum | FilterMode { LINEAR = GL_LINEAR , LINEAR_MIPMAP_LINEAR = GL_LINEAR_MIPMAP_LINEAR , LINEAR_MIPMAP_NEAREST = GL_LINEAR_MIPMAP_NEAREST , NEAREST = GL_NEAREST , NEAREST_MIPMAP_LINEAR = GL_NEAREST_MIPMAP_LINEAR , NEAREST_MIPMAP_NEAREST = GL_NEAREST_MIPMAP_NEAREST }
enum | InternalFormatMode { USE_IMAGE_DATA_FORMAT , USE_USER_DEFINED_FORMAT , USE_ARB_COMPRESSION , USE_S3TC_DXT1_COMPRESSION , USE_S3TC_DXT3_COMPRESSION , USE_S3TC_DXT5_COMPRESSION , USE_PVRTC_2BPP_COMPRESSION , USE_PVRTC_4BPP_COMPRESSION , USE_ETC_COMPRESSION , USE_ETC2_COMPRESSION , USE_RGTC1_COMPRESSION , USE_RGTC2_COMPRESSION , USE_S3TC_DXT1c_COMPRESSION , USE_S3TC_DXT1a_COMPRESSION }
enum | InternalFormatType { NORMALIZED = 0x0 , FLOAT = 0x1 , SIGNED_INTEGER = 0x2 , UNSIGNED_INTEGER = 0x4 }
enum | ShadowCompareFunc { NEVER = GL_NEVER , LESS = GL_LESS , EQUAL = GL_EQUAL , LEQUAL = GL_LEQUAL , GREATER = GL_GREATER , NOTEQUAL = GL_NOTEQUAL , GEQUAL = GL_GEQUAL , ALWAYS = GL_ALWAYS }
enum | ShadowTextureMode { LUMINANCE = GL_LUMINANCE , INTENSITY = GL_INTENSITY , ALPHA = GL_ALPHA , NONE = GL_NONE }
enum | GenerateMipmapMode { GENERATE_MIPMAP_NONE , GENERATE_MIPMAP , GENERATE_MIPMAP_TEX_PARAMETER }
typedef std::list< ref_ptr< TextureObject > > | TextureObjectList
Public Types inherited from osg::StateAttribute
enum | Values { OFF = 0x0 , ON = 0x1 , OVERRIDE = 0x2 , PROTECTED = 0x4 , INHERIT = 0x8 }

enum

Type {
TEXTURE , POLYGONMODE , POLYGONOFFSET , MATERIAL ,
ALPHAFUNC , ANTIALIAS , COLORTABLE , CULLFACE ,
FOG , FRONTFACE , LIGHT , POINT ,
LINEWIDTH , LINESTIPPLE , POLYGONSTIPPLE , SHADEMODEL ,
TEXENV , TEXENVFILTER , TEXGEN , TEXMAT ,
LIGHTMODEL , BLENDFUNC , BLENDEQUATION , LOGICOP ,
STENCIL , COLORMASK , DEPTH , VIEWPORT ,
SCISSOR , BLENDCOLOR , MULTISAMPLE , CLIPPLANE ,
COLORMATRIX , VERTEXPROGRAM , FRAGMENTPROGRAM , POINTSPRITE ,
PROGRAM , CLAMPCOLOR , HINT , SAMPLEMASKI ,
PRIMITIVERESTARTINDEX , CLIPCONTROL , VALIDATOR , VIEWMATRIXEXTRACTOR ,
OSGNV_PARAMETER_BLOCK , OSGNVEXT_TEXTURE_SHADER , OSGNVEXT_VERTEX_PROGRAM , OSGNVEXT_REGISTER_COMBINERS ,
OSGNVCG_PROGRAM , OSGNVSLANG_PROGRAM , OSGNVPARSE_PROGRAM_PARSER , UNIFORMBUFFERBINDING ,
TRANSFORMFEEDBACKBUFFERBINDING , ATOMICCOUNTERBUFFERBINDING , PATCH_PARAMETER , FRAME_BUFFER_OBJECT ,
VERTEX_ATTRIB_DIVISOR , SHADERSTORAGEBUFFERBINDING , INDIRECTDRAWBUFFERBINDING , VIEWPORTINDEXED ,
DEPTHRANGEINDEXED , SCISSORINDEXED , BINDIMAGETEXTURE , SAMPLER ,
CAPABILITY = 100
}

typedef GLenum | GLMode
typedef unsigned int | GLModeValue
typedef unsigned int | OverrideValue
typedef std::pair< Type, unsigned int > | TypeMemberPair
typedef std::vector< StateSet * > | ParentList
typedef osg::StateAttributeCallback | Callback
Public Types inherited from osg::Object
enum | DataVariance { DYNAMIC , STATIC , UNSPECIFIED }
Static Public Member Functions inherited from osg::Texture
static bool | isCompressedInternalFormat (GLint internalFormat)
static void | getCompressedSize (GLenum internalFormat, GLint width, GLint height, GLint depth, GLint &blockSize, GLint &size)
static osg::ref_ptr< TextureObject > | generateTextureObject (const Texture *texture, unsigned int contextID, GLenum target)
static osg::ref_ptr< TextureObject > | generateTextureObject (const Texture *texture, unsigned int contextID, GLenum target, GLint numMipmapLevels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border)
Static Public Member Functions inherited from osg::Referenced
static OpenThreads::Mutex * | getGlobalReferencedMutex ()
static void | setDeleteHandler (DeleteHandler *handler)
static DeleteHandler * | getDeleteHandler ()

## Detailed Description

Texture2DArray state class which encapsulates OpenGL 2D array texture functionality. Texture arrays were introduced with Shader Model 4.0 hardware.

A 2D texture array does contain textures sharing the same properties (e.g. size, bitdepth,...) in a layered structure. See http://www.opengl.org/registry/specs/EXT/texture_array.txt for more info.

## Member Typedef Documentation

## ImageModifiedCount

typedef buffered_value<unsigned int> osg::Texture2DArray::ImageModifiedCount

protected

## Images

typedef std::vector< ref_ptr<Image> > osg::Texture2DArray::Images

protected

## Constructor & Destructor Documentation

## Texture2DArray() [1/2]

osg::Texture2DArray::Texture2DArray | ( |  | ) |

Referenced by osg::Texture2DArray::SubloadCallback::load(), META_StateAttribute(), osg::Texture2DArray::SubloadCallback::subload(), and Texture2DArray().

## Texture2DArray() [2/2]

osg::Texture2DArray::Texture2DArray | ( | const Texture2DArray & | cm,
|  | const CopyOp & | copyop = CopyOp::SHALLOW_COPY )

Copy constructor using CopyOp to manage deep vs shallow copy.

References osg::CopyOp::SHALLOW_COPY, and Texture2DArray().

## ~Texture2DArray()

virtual osg::Texture2DArray::~Texture2DArray | ( |  | ) |

protected virtual

## Member Function Documentation

## allocateMipmap()

void osg::Texture2DArray::allocateMipmap | ( | State & | state | ) | const

protected virtual

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

Implements osg::Texture.

## apply()

virtual void osg::Texture2DArray::apply | ( | State & | state | ) | const

virtual

Bind the texture if already compiled. Otherwise recompile.

Implements osg::Texture.

## applyTexImage2DArray_subload()

void osg::Texture2DArray::applyTexImage2DArray_subload | ( | State & | state,
|  | Image * | image,
|  | GLsizei | layer,
|  | GLsizei | inwidth,
|  | GLsizei | inheight,
|  | GLsizei | indepth,
|  | GLint | inInternalFormat,
|  | GLsizei & | numMipmapLevels ) const

protected

## compare()

virtual int osg::Texture2DArray::compare | ( | const StateAttribute & | rhs | ) | const

virtual

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

Implements osg::StateAttribute.

## computeInternalFormat()

virtual void osg::Texture2DArray::computeInternalFormat | ( |  | ) | const

protected virtual

Implements osg::Texture.

## computeTextureDepth()

GLsizei osg::Texture2DArray::computeTextureDepth | ( |  | ) | const

protected

## copyTexSubImage2DArray()

void osg::Texture2DArray::copyTexSubImage2DArray | ( | State & | state,
|  | int | xoffset,
|  | int | yoffset,
|  | int | zoffset,
|  | int | x,
|  | int | y,
|  | int | width,
|  | int | height )

Copies a two-dimensional texture subimage, as per glCopyTexSubImage3D. Updates a portion of an existing OpenGL texture object from the current OpenGL background framebuffer contents at position x, y with width width and height height. Loads framebuffer data into the texture using offsets xoffset and yoffset. zoffset specifies the layer of the texture array to which the result is copied.

## getImage() [1/2]

virtual Image * osg::Texture2DArray::getImage | ( | unsigned int | layer | ) |

virtual

Get the texture image for specified layer.

Implements osg::Texture.

## getImage() [2/2]

virtual const Image * osg::Texture2DArray::getImage | ( | unsigned int | layer | ) | const

virtual

Get the const texture image for specified layer.

Implements osg::Texture.

## getModeUsage()

virtual bool osg::Texture2DArray::getModeUsage | ( | StateAttribute::ModeUsage & |  | ) | const

inline virtual

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

Reimplemented from osg::StateAttribute.

## getModifiedCount()

unsigned int & osg::Texture2DArray::getModifiedCount | ( | unsigned int | layer,
|  | unsigned int | contextID ) const

inline

Check how often was a certain layer in the given context modified

References _modifiedCount.

Referenced by isDirty().

## getNumImages()

virtual unsigned int osg::Texture2DArray::getNumImages | ( |  | ) | const

inline virtual

Get the number of images that are assigned to the Texture. The number is equal to the texture depth. To get the maximum possible image/layer count, you have to use the extension subclass, since it provides graphic context dependent information.

Implements osg::Texture.

References _images.

## getNumMipmapLevels()

unsigned int osg::Texture2DArray::getNumMipmapLevels | ( |  | ) | const

inline

Get the number of mip map levels the texture has been created with.

References _numMipmapLevels.

## getSubloadCallback() [1/2]

SubloadCallback * osg::Texture2DArray::getSubloadCallback | ( |  | ) |

inline

References _subloadCallback.

## getSubloadCallback() [2/2]

const SubloadCallback * osg::Texture2DArray::getSubloadCallback | ( |  | ) | const

inline

References _subloadCallback.

## getTextureDepth()

virtual int osg::Texture2DArray::getTextureDepth | ( |  | ) | const

inline virtual

Reimplemented from osg::Texture.

References _textureDepth.

## getTextureHeight()

virtual int osg::Texture2DArray::getTextureHeight | ( |  | ) | const

inline virtual

Reimplemented from osg::Texture.

References _textureHeight.

## getTextureTarget()

virtual GLenum osg::Texture2DArray::getTextureTarget | ( |  | ) | const

inline virtual

Implements osg::Texture.

References GL_TEXTURE_2D_ARRAY.

## getTextureWidth()

virtual int osg::Texture2DArray::getTextureWidth | ( |  | ) | const

inline virtual

Reimplemented from osg::Texture.

References _textureWidth.

## imagesValid()

bool osg::Texture2DArray::imagesValid | ( |  | ) | const

protected

## isDirty()

virtual bool osg::Texture2DArray::isDirty | ( | unsigned int | contextID | ) | const

inline virtual

return true if the texture image data has been modified and the associated GL texture object needs to be updated.

Reimplemented from osg::Texture.

References _images, _modifiedCount, and getModifiedCount().

## META_StateAttribute()

osg::Texture2DArray::META_StateAttribute | ( | osg | ,
|  | Texture2DArray | ,
|  | TEXTURE | )

References osg::StateAttribute::TEXTURE, and Texture2DArray().

## setImage() [1/2]

template<class T>

void osg::Texture2DArray::setImage | ( | unsigned int | layer,
|  | const ref_ptr< T > & | image )

inline

References osg::ref_ptr< T >::get(), and setImage().

Referenced by setImage().

## setImage() [2/2]

virtual void osg::Texture2DArray::setImage | ( | unsigned int | layer,
|  | Image * | image )

virtual

Set the texture image for specified layer.

Implements osg::Texture.

## setNumMipmapLevels()

void osg::Texture2DArray::setNumMipmapLevels | ( | unsigned int | num | ) | const

inline

Set the number of mip map levels the texture has been created with. Should only be called within an osg::Texture::apply() and custom OpenGL texture load.

References _numMipmapLevels.

## setSubloadCallback()

void osg::Texture2DArray::setSubloadCallback | ( | SubloadCallback * | cb | ) |

inline

References _subloadCallback.

## setTextureDepth()

void osg::Texture2DArray::setTextureDepth | ( | int | depth | ) |

## setTextureHeight()

void osg::Texture2DArray::setTextureHeight | ( | int | height | ) |

inline

References _textureHeight.

## setTextureSize()

void osg::Texture2DArray::setTextureSize | ( | int | width,
|  | int | height,
|  | int | depth )

Set the texture width and height. If width or height are zero then the respective size value is calculated from the source image sizes. Depth parameter specifies the number of layers to be used.

## setTextureWidth()

void osg::Texture2DArray::setTextureWidth | ( | int | width | ) |

inline

References _textureWidth.

## Member Data Documentation

## _images

Images osg::Texture2DArray::_images

protected

Referenced by getNumImages(), and isDirty().

## _modifiedCount

std::vector<ImageModifiedCount> osg::Texture2DArray::_modifiedCount

mutable protected

Referenced by getModifiedCount(), and isDirty().

## _numMipmapLevels

GLsizei osg::Texture2DArray::_numMipmapLevels

mutable protected

Referenced by getNumMipmapLevels(), and setNumMipmapLevels().

## _subloadCallback

ref_ptr<SubloadCallback> osg::Texture2DArray::_subloadCallback

protected

Referenced by getSubloadCallback(), getSubloadCallback(), and setSubloadCallback().

## _textureDepth

GLsizei osg::Texture2DArray::_textureDepth

protected

Referenced by getTextureDepth().

## _textureHeight

GLsizei osg::Texture2DArray::_textureHeight

protected

Referenced by getTextureHeight(), and setTextureHeight().

## _textureWidth

GLsizei osg::Texture2DArray::_textureWidth

mutable protected

Referenced by getTextureWidth(), and setTextureWidth().

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

- Texture2DArray