TextureCubeMap state class which encapsulates OpenGl texture cubemap functionality
Inheritance:
Public Classes
-
enum Face
-
class SG_EXPORT SubloadCallback: public Referenced
-
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
Public Methods
-
TextureCubeMap()
-
TextureCubeMap(const TextureCubeMap& cm, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
- Copy constructor using CopyOp to manage deep vs shallow copy
-
META_StateAttribute(osg, TextureCubeMap, 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
-
virtual void setImage(unsigned int face, Image* image)
- Set the texture image for specified face.
-
virtual Image* getImage(unsigned int face)
- Get the texture image for specified face.
-
virtual const Image* getImage(unsigned int face) const
- Get the const texture image for specified face.
-
virtual unsigned int getNumImages() const
- Get the number of images that can be assigned to the Texture.
-
inline unsigned int& getModifiedTag(unsigned int face, unsigned int contextID) const
-
inline void setTextureSize(int width, int height) const
- Set the texture width and height.
-
inline void getTextureSize(int& width, int& height) const
- Get the texture subload width.
-
void setSubloadCallback(SubloadCallback* cb)
-
SubloadCallback* getSubloadCallback()
-
const SubloadCallback* getSubloadCallback() const
-
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
-
unsigned int getNumMipmapLevels() const
- Get the number of mip map levels the the texture has been created with
-
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
-
static Extensions* getExtensions(unsigned int contextID, bool createIfNotInitalized)
- Function to call to get the extension of a specified context.
-
static void setExtensions(unsigned int contextID, Extensions* extensions)
- setExtensions allows users to override the extensions across graphics contexts.
Protected Fields
-
ref_ptr<Image> _images[6]
-
mutable GLsizei _textureWidth
-
mutable GLsizei _textureHeight
-
mutable GLsizei _numMipmapLevels
-
ref_ptr<SubloadCallback> _subloadCallback
-
mutable ImageModifiedTag _modifiedTag[6]
Protected Methods
-
virtual ~TextureCubeMap()
-
bool imagesValid() const
-
virtual void computeInternalFormat() const
Protected
-
typedef buffered_value<unsigned int> ImageModifiedTag
Inherited from Texture:
Public Classes
-
enum WrapParameter
-
enum WrapMode
-
enum FilterParameter
-
enum FilterMode
-
enum InternalFormatMode
-
enum ShadowCompareFunc
-
enum ShadowTextureMode
-
class TextureObject: public osg::Referenced
-
class SG_EXPORT TextureObjectManager: public osg::Referenced
Public Fields
-
mutable TextureObjectBuffer _textureObjectBuffer
Public Methods
-
virtual osg::Object* cloneType() const
-
virtual osg::Object* clone(const CopyOp& copyop) const
-
virtual bool isSameKindAs(const osg::Object* obj) const
-
virtual const char* libraryName() const
-
virtual const char* className() const
-
virtual Type getType() const
-
virtual bool isTextureAttribute() const
-
void setWrap(WrapParameter which, WrapMode wrap)
-
WrapMode getWrap(WrapParameter which) const
-
void setBorderColor(const Vec4& color)
-
const Vec4& getBorderColor() const
-
void setBorderWidth(GLint width)
-
GLint getBorderWidth() const
-
void setFilter(FilterParameter which, FilterMode filter)
-
FilterMode getFilter(FilterParameter which) const
-
void setMaxAnisotropy(float anis)
-
inline float getMaxAnisotropy() const
-
inline void setUseHardwareMipMapGeneration(bool useHardwareMipMapGeneration)
-
inline bool getUseHardwareMipMapGeneration() const
-
inline void setUnRefImageDataAfterApply(bool flag)
-
inline bool getUnRefImageDataAfterApply() const
-
inline void setClientStorageHint(bool flag)
-
inline bool getClientStorageHint() const
-
inline void setInternalFormatMode(InternalFormatMode mode)
-
inline InternalFormatMode getInternalFormatMode() const
-
inline void setInternalFormat(GLint internalFormat)
-
inline GLint getInternalFormat() const
-
bool isCompressedInternalFormat() const
-
inline TextureObject* getTextureObject(unsigned int contextID) const
-
void dirtyTextureObject()
-
bool areAllTextureObjectsLoaded() const
-
inline unsigned int& getTextureParameterDirty(unsigned int contextID) const
-
void dirtyTextureParameters()
-
void setShadowComparison(bool flag)
-
void setShadowCompareFunc(ShadowCompareFunc func)
-
ShadowCompareFunc getShadowCompareFunc()
-
void setShadowTextureMode(ShadowTextureMode mode)
-
ShadowTextureMode getShadowTextureMode()
-
void setShadowAmbient(float shadow_ambient)
-
float getShadowAmbient()
-
virtual void compileGLObjects(State& state) const
-
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
-
void takeTextureObjects(TextureObjectListMap& toblm)
-
static void setTextureObjectManager(TextureObjectManager* tom)
-
static TextureObjectManager* getTextureObjectManager()
-
static void flushTextureObjects(unsigned int contextID, double currentTime, double& availableTime)
Public
-
typedef std::list< ref_ptr<TextureObject> > TextureObjectList
-
typedef std::map<unsigned int, TextureObjectList > TextureObjectListMap
-
typedef buffered_object< ref_ptr<TextureObject> > TextureObjectBuffer
Protected Fields
-
mutable TexParameterDirtyList _texParametersDirtyList
-
WrapMode _wrap_s
-
WrapMode _wrap_t
-
WrapMode _wrap_r
-
FilterMode _min_filter
-
FilterMode _mag_filter
-
float _maxAnisotropy
-
bool _useHardwareMipMapGeneration
-
bool _unrefImageDataAfterApply
-
bool _clientStorageHint
-
Vec4 _borderColor
-
GLint _borderWidth
-
InternalFormatMode _internalFormatMode
-
mutable GLint _internalFormat
-
bool _use_shadow_comparison
-
ShadowCompareFunc _shadow_compare_func
-
ShadowTextureMode _shadow_texture_mode
-
float _shadow_ambient
Protected Methods
-
void computeInternalFormatWithImage(const osg::Image& image) const
-
void computeRequiredTextureDimensions(State& state, const osg::Image& image, GLsizei& width, GLsizei& height, GLsizei& numMipmapLevels) const
-
bool isCompressedInternalFormat(GLint internalFormat) const
-
void applyTexParameters(GLenum target, State& state) const
-
int compareTexture(const Texture& rhs) const
Protected
-
typedef buffered_value<unsigned int> TexParameterDirtyList
Public Classes
-
enum Values
-
enum Types
-
struct ModeUsage
Public Methods
-
bool operator < (const StateAttribute& rhs) const
-
bool operator == (const StateAttribute& rhs) const
-
bool operator != (const StateAttribute& rhs) const
Public
-
typedef GLenum GLMode
-
typedef unsigned int GLModeValue
-
typedef unsigned int OverrideValue
-
typedef unsigned int Type
Inherited from Object:
Public Classes
-
enum DataVariance
Public Methods
-
inline void setDataVariance(DataVariance dv)
-
inline DataVariance getDataVariance() const
-
inline void setUserData(Referenced* obj)
-
inline Referenced* getUserData()
-
inline const Referenced* getUserData() const
Protected Fields
-
DataVariance _dataVariance
-
ref_ptr<Referenced> _userData
Public Methods
-
inline Referenced& operator = (const Referenced&)
-
static void setDeleteHandler(DeleteHandler* handler)
-
static DeleteHandler* getDeleteHandler()
-
inline void ref() const
-
inline void unref_nodelete() const
-
inline int referenceCount() const
-
inline void unref() const
Protected Fields
-
mutable OpenThreads::Mutex _refMutex
-
mutable int _refCount
Documentation
TextureCubeMap state class which encapsulates OpenGl texture cubemap functionality
- TextureCubeMap()
- TextureCubeMap(const TextureCubeMap& cm, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
- Copy constructor using CopyOp to manage deep vs shallow copy
- META_StateAttribute(osg, TextureCubeMap, 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
- enum Face
- POSITIVE_X
- NEGATIVE_X
- POSITIVE_Y
- NEGATIVE_Y
- POSITIVE_Z
- NEGATIVE_Z
- virtual void setImage(unsigned int face, Image* image)
- Set the texture image for specified face.
- virtual Image* getImage(unsigned int face)
- Get the texture image for specified face.
- virtual const Image* getImage(unsigned int face) const
- Get the const texture image for specified face.
- virtual unsigned int getNumImages() const
- Get the number of images that can be assigned to the Texture.
- inline unsigned int& getModifiedTag(unsigned int face, unsigned int contextID) const
- inline 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.
- inline void getTextureSize(int& width, int& height) const
- Get the texture subload width.
- void setSubloadCallback(SubloadCallback* cb)
- SubloadCallback* getSubloadCallback()
- const SubloadCallback* getSubloadCallback() const
- 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
- unsigned int getNumMipmapLevels() const
- Get the number of mip map levels the the texture has been created with
- 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
- static Extensions* getExtensions(unsigned int contextID, bool createIfNotInitalized)
- Function to call to get the extension of a specified context.
If the Exentsion object for that context has not yet been created then
and the 'createIfNotInitalized' flag been set to false then returns NULL.
If 'createIfNotInitalized' is true then the Extensions object is
automatically created. However, in this case the extension object
only be created with the graphics context associated with ContextID..
- static void setExtensions(unsigned int contextID, Extensions* extensions)
- setExtensions allows users to override the extensions across graphics contexts.
typically used when you have different extensions supported across graphics pipes
but need to ensure that they all use the same low common denominator extensions.
- virtual ~TextureCubeMap()
- bool imagesValid() const
- virtual void computeInternalFormat() const
- ref_ptr<Image> _images[6]
- mutable GLsizei _textureWidth
- mutable GLsizei _textureHeight
- mutable GLsizei _numMipmapLevels
- ref_ptr<SubloadCallback> _subloadCallback
- typedef buffered_value<unsigned int> ImageModifiedTag
- mutable ImageModifiedTag _modifiedTag[6]
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.