#include <OgreGLTexture.h>
Inheritance diagram for Ogre::GLTexture:

Public Member Functions | |||||||
| GLTexture (ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader, GLSupport &support) | |||||||
| virtual | ~GLTexture () | ||||||
| void | loadImage (const Image &img) | ||||||
| Loads the data from an image. | |||||||
| void | createRenderTexture () | ||||||
| HardwarePixelBufferSharedPtr | getBuffer (size_t face, size_t mipmap) | ||||||
This buffer can then be used to copy data from and to a particular level of the texture.
| |||||||
| GLenum | getGLTextureTarget (void) const | ||||||
| GLuint | getGLID () const | ||||||
| virtual void | setTextureType (TextureType ttype) | ||||||
| Sets the type of texture; can only be changed before load(). | |||||||
| virtual TextureType | getTextureType (void) const | ||||||
| Gets the type of texture. | |||||||
| virtual size_t | getNumMipmaps (void) const | ||||||
| Gets the number of mipmaps to be used for this texture. | |||||||
| virtual void | setNumMipmaps (size_t num) | ||||||
| Sets the number of mipmaps to be used for this texture. | |||||||
| virtual bool | getMipmapsHardwareGenerated (void) const | ||||||
| Are mipmaps hardware generated? | |||||||
| virtual float | getGamma (void) const | ||||||
| Returns the gamma adjustment factor applied to this texture. | |||||||
| virtual void | setGamma (float g) | ||||||
| Sets the gamma adjustment factor applied to this texture. | |||||||
| virtual unsigned int | getHeight (void) const | ||||||
| Returns the height of the texture. | |||||||
| virtual unsigned int | getWidth (void) const | ||||||
| Returns the width of the texture. | |||||||
| virtual unsigned int | getDepth (void) const | ||||||
| Returns the depth of the texture (only applicable for 3D textures). | |||||||
| virtual unsigned int | getSrcHeight (void) const | ||||||
| Returns the height of the original input texture (may differ due to hardware requirements). | |||||||
| virtual unsigned int | getSrcWidth (void) const | ||||||
| Returns the width of the original input texture (may differ due to hardware requirements). | |||||||
| virtual unsigned int | getSrcDepth (void) const | ||||||
| Returns the original depth of the input texture (only applicable for 3D textures). | |||||||
| virtual void | setHeight (unsigned int h) | ||||||
| Set the height of the texture; can only do this before load();. | |||||||
| virtual void | setWidth (unsigned int w) | ||||||
| Set the width of the texture; can only do this before load();. | |||||||
| virtual void | setDepth (unsigned int d) | ||||||
| Set the depth of the texture (only applicable for 3D textures); ; can only do this before load();. | |||||||
| virtual int | getUsage () const | ||||||
| Returns the TextureUsage indentifier for this Texture. | |||||||
| virtual void | setUsage (int u) | ||||||
| Sets the TextureUsage indentifier for this Texture; only useful before load(). | |||||||
| virtual void | createInternalResources (void) | ||||||
| Creates the internal texture resources for this texture. | |||||||
| virtual void | freeInternalResources (void) | ||||||
| Frees internal texture resources for this texture. | |||||||
| virtual void | copyToTexture (TexturePtr &target) | ||||||
| Copies (and maybe scales to fit) the contents of this texture to another texture. | |||||||
| virtual void | loadRawData (DataStreamPtr &stream, ushort uWidth, ushort uHeight, PixelFormat eFormat) | ||||||
| Loads the data from a raw stream. | |||||||
| virtual void | enable32Bit (bool setting=true) | ||||||
| virtual PixelFormat | getFormat () const | ||||||
| Returns the pixel format for the texture surface. | |||||||
| virtual void | setFormat (PixelFormat pf) | ||||||
| Sets the pixel format for the texture surface; can only be set before load(). | |||||||
| virtual bool | hasAlpha (void) const | ||||||
| Returns true if the texture has an alpha layer. | |||||||
| virtual size_t | getNumFaces () const | ||||||
| Return the number of faces this texture has. | |||||||
| virtual void | load (void) | ||||||
| Loads the resource, if it is not already. | |||||||
| virtual void | reload (void) | ||||||
| Reloads the resource, if it is already loaded. | |||||||
| bool | isReloadable (void) const | ||||||
| Returns true if the Resource is reloadable, false otherwise. | |||||||
| bool | isManuallyLoaded (void) const | ||||||
| Is this resource manually loaded? | |||||||
| virtual void | unload (void) | ||||||
| Unloads the resource; this is not permanent, the resource can be reloaded later if required. | |||||||
| size_t | getSize (void) const | ||||||
| Retrieves info about the size of the resource. | |||||||
| virtual void | touch (void) | ||||||
| 'Touches' the resource to indicate it has been used. | |||||||
| const String & | getName (void) const | ||||||
| Gets resource name. | |||||||
| ResourceHandle | getHandle (void) const | ||||||
| bool | isLoaded (void) const | ||||||
| Returns true if the Resource has been loaded, false otherwise. | |||||||
| const String & | getGroup (void) | ||||||
| Gets the group which this resource is a member of. | |||||||
| void | changeGroupOwnership (const String &newGroup) | ||||||
| Change the resource group ownership of a Resource. | |||||||
| ResourceManager * | getCreator (void) | ||||||
| Gets the manager which created this resource. | |||||||
| const String & | getOrigin (void) const | ||||||
| Get the origin of this resource, e.g. | |||||||
| void | _notifyOrigin (const String &origin) | ||||||
| Notify this resource of it's origin. | |||||||
| ParamDictionary * | getParamDictionary (void) | ||||||
| Retrieves the parameter dictionary for this class. | |||||||
| const ParamDictionary * | getParamDictionary (void) const | ||||||
| const ParameterList & | getParameters (void) const | ||||||
| Retrieves a list of parameters valid for this object. | |||||||
| virtual bool | setParameter (const String &name, const String &value) | ||||||
| Generic parameter setting method. | |||||||
| virtual void | setParameterList (const NameValuePairList ¶mList) | ||||||
| Generic multiple parameter setting method. | |||||||
| virtual String | getParameter (const String &name) const | ||||||
| Generic parameter retrieval method. | |||||||
| virtual void | copyParametersTo (StringInterface *dest) const | ||||||
| Method for copying this object's parameters to another object. | |||||||
Static Public Member Functions | |||||||
| static void | cleanupDictionary () | ||||||
| Cleans up the static 'msDictionary' required to reset Ogre, otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the ResourceManager implementers (e.g. | |||||||
Protected Member Functions | |||||||
| void | createInternalResourcesImpl (void) | ||||||
| | |||||||
| void | loadImpl (void) | ||||||
| | |||||||
| void | freeInternalResourcesImpl (void) | ||||||
| | |||||||
| void | _createSurfaceList () | ||||||
| internal method, create GLHardwarePixelBuffers for every face and mipmap level. | |||||||
| size_t | calculateSize (void) const | ||||||
| | |||||||
| virtual void | _loadImages (const std::vector< const Image * > &images) | ||||||
| Generic method to load the texture from a set of images. | |||||||
| void | unloadImpl (void) | ||||||
| Default implementation of unload which calls freeInternalResources. | |||||||
| bool | createParamDictionary (const String &className) | ||||||
| Internal method for creating a parameter dictionary for the class, if it does not already exist. | |||||||
Protected Attributes | |||||||
| unsigned long | mHeight | ||||||
| unsigned long | mWidth | ||||||
| unsigned long | mDepth | ||||||
| size_t | mNumRequestedMipmaps | ||||||
| size_t | mNumMipmaps | ||||||
| bool | mMipmapsHardwareGenerated | ||||||
| float | mGamma | ||||||
| TextureType | mTextureType | ||||||
| PixelFormat | mFormat | ||||||
| int | mUsage | ||||||
| unsigned short | mSrcBpp | ||||||
| unsigned long | mSrcWidth | ||||||
| unsigned long | mSrcHeight | ||||||
| unsigned long | mSrcDepth | ||||||
| unsigned short | mFinalBpp | ||||||
| bool | mHasAlpha | ||||||
| bool | mInternalResourcesCreated | ||||||
| ResourceManager * | mCreator | ||||||
| Creator. | |||||||
| String | mName | ||||||
| Unique name of the resource. | |||||||
| String | mGroup | ||||||
| The name of the resource group. | |||||||
| ResourceHandle | mHandle | ||||||
| Numeric handle for more efficient look up than name. | |||||||
| bool | mIsLoaded | ||||||
| Is the resource currently loaded? | |||||||
| size_t | mSize | ||||||
| The size of the resource in bytes. | |||||||
| bool | mIsManual | ||||||
| Is this file manually loaded? | |||||||
| String | mOrigin | ||||||
| Origin of this resource (e.g. script name) - optional. | |||||||
| ManualResourceLoader * | mLoader | ||||||
| Optional manual loader; if provided, data is loaded from here instead of a file. | |||||||
| String | mParamDictName | ||||||
| Class name for this instance to be used as a lookup (must be initialised by subclasses). | |||||||
Static Protected Attributes | |||||||
| static ParamDictionaryMap | msDictionary | ||||||
| Dictionary of parameters. | |||||||
Private Types | |||||||
| typedef std::vector< HardwarePixelBufferSharedPtr > | SurfaceList | ||||||
| Vector of pointers to subsurfaces. | |||||||
Private Attributes | |||||||
| GLuint | mTextureID | ||||||
| GLSupport & | mGLSupport | ||||||
| SurfaceList | mSurfaceList | ||||||
|
|
Vector of pointers to subsurfaces.
Definition at line 79 of file OgreGLTexture.h. |
|
||||||||||||||||||||||||||||||||
|
|
|
|
|
|
|
internal method, create GLHardwarePixelBuffers for every face and mipmap level. This method must be called after the GL texture object was created, the number of mipmaps was set (GL_TEXTURE_MAX_LEVEL) and glTexImageXD was called to actually allocate the buffer |
|
|
Generic method to load the texture from a set of images. This can be used by the specific implementation for convience. Implementations might decide not to use this function if they can use their own image loading functions.
|
|
|
Notify this resource of it's origin.
Definition at line 223 of file OgreResource.h. |
|
|
Implements Ogre::Resource. |
|
|
Change the resource group ownership of a Resource.
|
|
|
Cleans up the static 'msDictionary' required to reset Ogre, otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the ResourceManager implementers (e.g. MaterialManager) initializes. |
|
|
Method for copying this object's parameters to another object.
Definition at line 296 of file OgreStringInterface.h. References Ogre::ParamDictionary::mParamDefs. |
|
|
Copies (and maybe scales to fit) the contents of this texture to another texture.
Reimplemented in Ogre::D3D9Texture. |
|
|
Creates the internal texture resources for this texture.
|
|
|
Implements Ogre::Texture. |
|
|
Internal method for creating a parameter dictionary for the class, if it does not already exist.
Definition at line 172 of file OgreStringInterface.h. |
|
|
|
|
|
Definition at line 213 of file OgreTexture.h. |
|
|
Frees internal texture resources for this texture.
|
|
|
Implements Ogre::Texture. |
|
||||||||||||
|
This buffer can then be used to copy data from and to a particular level of the texture.
Implements Ogre::Texture. |
|
|
Gets the manager which created this resource.
Definition at line 214 of file OgreResource.h. |
|
|
Returns the depth of the texture (only applicable for 3D textures).
Definition at line 140 of file OgreTexture.h. |
|
|
Returns the pixel format for the texture surface.
Definition at line 219 of file OgreTexture.h. |
|
|
Returns the gamma adjustment factor applied to this texture.
Definition at line 122 of file OgreTexture.h. |
|
|
Definition at line 57 of file OgreGLTexture.h. References mTextureID. |
|
|
|
|
|
Gets the group which this resource is a member of.
Reimplemented in Ogre::SkeletonInstance. Definition at line 202 of file OgreResource.h. |
|
|
Reimplemented in Ogre::SkeletonInstance. Definition at line 188 of file OgreResource.h. |
|
|
Returns the height of the texture.
Definition at line 132 of file OgreTexture.h. |
|
|
Are mipmaps hardware generated?
Definition at line 118 of file OgreTexture.h. |
|
|
Gets resource name.
Reimplemented in Ogre::SkeletonInstance. Definition at line 183 of file OgreResource.h. |
|
|
Return the number of faces this texture has. This will be 6 for a cubemap texture and 1 for a 1D, 2D or 3D one. |
|
|
Gets the number of mipmaps to be used for this texture.
Definition at line 106 of file OgreTexture.h. |
|
|
Get the origin of this resource, e.g. a script file name.
Definition at line 221 of file OgreResource.h. |
|
|
Definition at line 209 of file OgreStringInterface.h. |
|
|
Retrieves the parameter dictionary for this class.
Definition at line 196 of file OgreStringInterface.h. |
|
|
Generic parameter retrieval method.
Definition at line 265 of file OgreStringInterface.h. References Ogre::ParamDictionary::getParamCommand(). |
|
|
Retrieves a list of parameters valid for this object.
|
|
|
Retrieves info about the size of the resource.
Definition at line 172 of file OgreResource.h. |
|
|
Returns the original depth of the input texture (only applicable for 3D textures).
Definition at line 152 of file OgreTexture.h. |
|
|
Returns the height of the original input texture (may differ due to hardware requirements).
Definition at line 144 of file OgreTexture.h. |
|
|
Returns the width of the original input texture (may differ due to hardware requirements).
Definition at line 148 of file OgreTexture.h. |
|
|
Gets the type of texture.
Definition at line 102 of file OgreTexture.h. |
|
|
Returns the TextureUsage indentifier for this Texture.
Definition at line 169 of file OgreTexture.h. |
|
|
Returns the width of the texture.
Definition at line 136 of file OgreTexture.h. |
|
|
Returns true if the texture has an alpha layer.
Definition at line 228 of file OgreTexture.h. |
|
|
Returns true if the Resource has been loaded, false otherwise.
Definition at line 195 of file OgreResource.h. References OGRE_LOCK_AUTO_MUTEX. |
|
|
Is this resource manually loaded?
Definition at line 160 of file OgreResource.h. |
|
|
Returns true if the Resource is reloadable, false otherwise.
Definition at line 153 of file OgreResource.h. |
|
|
Loads the resource, if it is not already.
Reimplemented in Ogre::Mesh, and Ogre::GLSLGpuProgram. |
|
|
Loads the data from an image.
Implements Ogre::Texture. |
|
|
Implements Ogre::Resource. |
|
||||||||||||||||||||
|
Loads the data from a raw stream.
|
|
|
Reloads the resource, if it is already loaded.
|
|
|
Set the depth of the texture (only applicable for 3D textures); ; can only do this before load();.
Definition at line 165 of file OgreTexture.h. |
|
|
Sets the pixel format for the texture surface; can only be set before load().
|
|
|
Sets the gamma adjustment factor applied to this texture.
Definition at line 128 of file OgreTexture.h. |
|
|
Set the height of the texture; can only do this before load();.
Definition at line 156 of file OgreTexture.h. |
|
|
Sets the number of mipmaps to be used for this texture.
Definition at line 112 of file OgreTexture.h. |
|
||||||||||||
|
Generic parameter setting method.
|
|
|
Generic multiple parameter setting method.
|
|
|
Sets the type of texture; can only be changed before load().
Definition at line 98 of file OgreTexture.h. |
|
|
Sets the TextureUsage indentifier for this Texture; only useful before load().
Definition at line 181 of file OgreTexture.h. |
|
|
Set the width of the texture; can only do this before load();.
Definition at line 160 of file OgreTexture.h. |
|
|
'Touches' the resource to indicate it has been used.
Reimplemented in Ogre::Material. Referenced by Ogre::Material::touch(). |
|
|
Unloads the resource; this is not permanent, the resource can be reloaded later if required.
Reimplemented in Ogre::GLSLGpuProgram. |
|
|
Default implementation of unload which calls freeInternalResources.
Implements Ogre::Resource. |
|
|
Creator.
Definition at line 73 of file OgreResource.h. |
|
|
Definition at line 255 of file OgreTexture.h. |
|
|
Definition at line 268 of file OgreTexture.h. |
|
|
Definition at line 263 of file OgreTexture.h. |
|
|
Definition at line 260 of file OgreTexture.h. |
|
|
Definition at line 76 of file OgreGLTexture.h. |
|
|
The name of the resource group.
Definition at line 77 of file OgreResource.h. |
|
|
Numeric handle for more efficient look up than name.
Definition at line 79 of file OgreResource.h. |
|
|
Definition at line 269 of file OgreTexture.h. |
|
|
Definition at line 253 of file OgreTexture.h. |
|
|
Definition at line 271 of file OgreTexture.h. |
|
|
Is the resource currently loaded?
Definition at line 81 of file OgreResource.h. |
|
|
Is this file manually loaded?
Definition at line 85 of file OgreResource.h. |
|
|
Optional manual loader; if provided, data is loaded from here instead of a file.
Definition at line 89 of file OgreResource.h. |
|
|
Definition at line 259 of file OgreTexture.h. |
|
|
Unique name of the resource.
Definition at line 75 of file OgreResource.h. |
|
|
Definition at line 258 of file OgreTexture.h. |
|
|
Definition at line 257 of file OgreTexture.h. |
|
|
Origin of this resource (e.g. script name) - optional.
Definition at line 87 of file OgreResource.h. |
|
|
Class name for this instance to be used as a lookup (must be initialised by subclasses).
Definition at line 160 of file OgreStringInterface.h. |
|
|
Dictionary of parameters.
Definition at line 157 of file OgreStringInterface.h. |
|
|
The size of the resource in bytes.
Definition at line 83 of file OgreResource.h. |
|
|
Definition at line 266 of file OgreTexture.h. |
|
|
Definition at line 267 of file OgreTexture.h. |
|
|
Definition at line 267 of file OgreTexture.h. |
|
|
Definition at line 267 of file OgreTexture.h. |
|
|
Definition at line 80 of file OgreGLTexture.h. |
|
|
Definition at line 75 of file OgreGLTexture.h. Referenced by getGLID(). |
|
|
Definition at line 262 of file OgreTexture.h. |
|
|
Definition at line 264 of file OgreTexture.h. |
|
|
Definition at line 254 of file OgreTexture.h. |
Copyright © 2000-2005 by The OGRE Team

This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Jan 21 10:11:55 2007