#include <OGREInterfaces.h>
Inherits DigitalSpaces::DIObjectBase.
Public Member Functions | |
| DIOGRETexture * | load (const char *name, const char *group, OGRETextureType texType=TEX_TYPE_2D, int numMipmaps=-1, float gamma=1.0f) |
| Loads a texture from a file. | |
| DIOGRETexture * | loadRawData (const char *name, const char *group, void *stream, unsigned int stream_length, unsigned short uWidth, unsigned short uHeight, OGREPixelFormat format, OGRETextureType texType=TEX_TYPE_2D, int iNumMipmaps=-1, float gamma=1.0f) |
| Loads a texture from a raw data stream. | |
| DIOGRETexture * | createManual (const char *name, const char *group, OGRETextureType texType, unsigned int width, unsigned int height, unsigned int depth, int num_mips, OGREPixelFormat format, int usage=TU_DEFAULT) |
| Create a manual texture with specified width, height and depth (not loaded from a file). | |
| DIOGRETexture * | createManual (const char *name, const char *group, OGRETextureType texType, unsigned int width, unsigned int height, int num_mips, OGREPixelFormat format, int usage=TU_DEFAULT) |
| Create a manual texture with a depth of 1 (not loaded from a file). | |
| void | setPreferredIntegerBitDepth (unsigned short bits) |
| unsigned short | getPreferredIntegerBitDepth () |
| void | setDefaultNumMipmaps (unsigned int num) |
| Sets the default number of mipmaps to be used for loaded textures, for when textures are loaded automatically (e.g. | |
| unsigned int | getDefaultNumMipmaps () |
| Gets the default number of mipmaps to be used for loaded textures. | |
| DIOGREPixelBox * | createPixelBox (unsigned int width, unsigned int height, unsigned int depth, OGREPixelFormat format) |
| Creates a PixelBox object. | |
| void | UpdateRenderTarget (const char *name) |
| Update a RenderTarget. | |
| DIOGRETexture* DigitalSpaces::DIOGRETextureManager::load | ( | const char * | name, | |
| const char * | group, | |||
| OGRETextureType | texType = TEX_TYPE_2D, |
|||
| int | numMipmaps = -1, |
|||
| float | gamma = 1.0f | |||
| ) |
Loads a texture from a file.
| name | The file to load, or a String identifier in some cases | |
| group | The name of the resource group to assign the texture to | |
| texType | The type of texture to load/create, defaults to normal 2D textures | |
| numMipmaps | The number of pre-filtered mipmaps to generate. If left to default (-1) then the TextureManager's default number of mipmaps will be used (see setDefaultNumMipmaps()) If set to MIP_UNLIMITED mipmaps will be generated until the lowest possible level, 1x1x1. | |
| gamma | The gamma adjustment factor to apply to this texture (brightening/darkening) |
| DIOGRETexture* DigitalSpaces::DIOGRETextureManager::loadRawData | ( | const char * | name, | |
| const char * | group, | |||
| void * | stream, | |||
| unsigned int | stream_length, | |||
| unsigned short | uWidth, | |||
| unsigned short | uHeight, | |||
| OGREPixelFormat | format, | |||
| OGRETextureType | texType = TEX_TYPE_2D, |
|||
| int | iNumMipmaps = -1, |
|||
| float | gamma = 1.0f | |||
| ) |
Loads a texture from a raw data stream.
| name | The name to give the resulting texture | |
| group | The name of the resource group to assign the texture to | |
| stream | Incoming data stream | |
| width,height | The dimensions of the texture | |
| format | The format of the data being passed in; the manager reserves the right to create a different format for the texture if the original format is not available in this context. | |
| texType | The type of texture to load/create, defaults to normal 2D textures | |
| numMipmaps | The number of pre-filtered mipmaps to generate. If left to default (-1) then the TextureManager's default number of mipmaps will be used (see setDefaultNumMipmaps()) If set to MIP_UNLIMITED mipmaps will be generated until the lowest possible level, 1x1x1. | |
| gamma | The gamma adjustment factor to apply to this texture (brightening/darkening) |
| DIOGRETexture* DigitalSpaces::DIOGRETextureManager::createManual | ( | const char * | name, | |
| const char * | group, | |||
| OGRETextureType | texType, | |||
| unsigned int | width, | |||
| unsigned int | height, | |||
| unsigned int | depth, | |||
| int | num_mips, | |||
| OGREPixelFormat | format, | |||
| int | usage = TU_DEFAULT | |||
| ) |
Create a manual texture with specified width, height and depth (not loaded from a file).
| name | The name to give the resulting texture | |
| group | The name of the resource group to assign the texture to | |
| texType | The type of texture to load/create, defaults to normal 2D textures | |
| width,height,depth | The dimensions of the texture | |
| numMipmaps | The number of pre-filtered mipmaps to generate. If left to default (-1) then the TextureManager's default number of mipmaps will be used (see setDefaultNumMipmaps()) If set to MIP_UNLIMITED mipmaps will be generated until the lowest possible level, 1x1x1. | |
| format | The internal format you wish to request; the manager reserves the right to create a different format if the one you select is not available in this context. | |
| usage | The kind of usage this texture is intended for. It is a combination of TU_STATIC, TU_DYNAMIC, TU_WRITE_ONLY, TU_AUTOMIPMAP and TU_RENDERTARGET (see TextureUsage enum). You are strongly advised to use HBU_STATIC_WRITE_ONLY wherever possible, if you need to update regularly, consider HBU_DYNAMIC_WRITE_ONLY. | |
| loader | If you intend the contents of the manual texture to be regularly updated, to the extent that you don't need to recover the contents if the texture content is lost somehow, you can leave this parameter as 0. However, if you intend to populate the texture only once, then you should implement ManualResourceLoader and pass a pointer to it in this parameter; this means that if the manual texture ever needs to be reloaded, the ManualResourceLoader will be called to do it. |
| DIOGRETexture* DigitalSpaces::DIOGRETextureManager::createManual | ( | const char * | name, | |
| const char * | group, | |||
| OGRETextureType | texType, | |||
| unsigned int | width, | |||
| unsigned int | height, | |||
| int | num_mips, | |||
| OGREPixelFormat | format, | |||
| int | usage = TU_DEFAULT | |||
| ) |
Create a manual texture with a depth of 1 (not loaded from a file).
| name | The name to give the resulting texture | |
| group | The name of the resource group to assign the texture to | |
| texType | The type of texture to load/create, defaults to normal 2D textures | |
| width,height | The dimensions of the texture | |
| numMipmaps | The number of pre-filtered mipmaps to generate. If left to default (-1) then the TextureManager's default number of mipmaps will be used (see setDefaultNumMipmaps()). If set to MIP_UNLIMITED mipmaps will be generated until the lowest possible level, 1x1x1. | |
| format | The internal format you wish to request; the manager reserves the right to create a different format if the one you select is not available in this context. | |
| usage | The kind of usage this texture is intended for. It is a combination of TU_STATIC, TU_DYNAMIC, TU_WRITE_ONLY, TU_AUTOMIPMAP and TU_RENDERTARGET (see TextureUsage enum). You are strongly advised to use HBU_STATIC_WRITE_ONLY wherever possible, if you need to update regularly, consider HBU_DYNAMIC_WRITE_ONLY. | |
| loader | If you intend the contents of the manual texture to be regularly updated, to the extent that you don't need to recover the contents if the texture content is lost somehow, you can leave this parameter as 0. However, if you intend to populate the texture only once, then you should implement ManualResourceLoader and pass a pointer to it in this parameter; this means that if the manual texture ever needs to be reloaded, the ManualResourceLoader will be called to do it. |
| void DigitalSpaces::DIOGRETextureManager::setPreferredIntegerBitDepth | ( | unsigned short | bits | ) |
| unsigned short DigitalSpaces::DIOGRETextureManager::getPreferredIntegerBitDepth | ( | ) |
| void DigitalSpaces::DIOGRETextureManager::setDefaultNumMipmaps | ( | unsigned int | num | ) |
Sets the default number of mipmaps to be used for loaded textures, for when textures are loaded automatically (e.g.
by Material class) or when 'load' is called with the default parameters by the application. If set to MIP_UNLIMITED mipmaps will be generated until the lowest possible level, 1x1x1.
| unsigned int DigitalSpaces::DIOGRETextureManager::getDefaultNumMipmaps | ( | ) |
Gets the default number of mipmaps to be used for loaded textures.
| DIOGREPixelBox* DigitalSpaces::DIOGRETextureManager::createPixelBox | ( | unsigned int | width, | |
| unsigned int | height, | |||
| unsigned int | depth, | |||
| OGREPixelFormat | format | |||
| ) |
Creates a PixelBox object.
By OGRE API, these objects are freely created (no factory), however DInterfaces need a factory.
| void DigitalSpaces::DIOGRETextureManager::UpdateRenderTarget | ( | const char * | name | ) |
Update a RenderTarget.
This is a convenience function.
1.5.6