

Public Member Functions | |
| virtual ushort | getWidth (void) const |
| Returns the current pixel width of the texture. | |
| virtual ushort | getHeight (void) const |
| Returns the current pixel height of the texture. | |
| virtual ushort | getOriginalWidth (void) const |
| Returns the original pixel width of the data loaded into the texture. | |
| virtual ushort | getOriginalHeight (void) const |
| Returns the original pixel height of the data loaded into the texture. | |
| virtual float | getXScale (void) const |
| Returns the current scale used for the width of the texture. | |
| virtual float | getYScale (void) const |
| Returns the current scale used for the height of the texture. | |
| virtual void | loadFromFile (const String &filename, const String &resourceGroup) |
| Loads the specified image file into the texture. The texture is resized as required to hold the image. | |
| virtual void | loadFromMemory (const void *buffPtr, uint buffWidth, uint buffHeight, PixelFormat pixelFormat) |
| Loads (copies) an image in memory into the texture. The texture is resized as required to hold the image. | |
| GLuint | getOGLTexid (void) const |
| Return a pointer to the internal texture id. | |
| void | setOGLTextureSize (uint size) |
| set the size of the internal texture. | |
| void | grabTexture (void) |
| Grab the texture to a local buffer. This will destroy the OpenGL texture, and restoreTexture must be called before using it again. | |
| void | restoreTexture (void) |
| Restore the texture from the locally buffered copy previously create by a call to grabTexture. | |
Friends | |
| Texture * | OpenGLRenderer::createTexture (void) |
| Texture * | OpenGLRenderer::createTexture (const String &filename, const String &resourceGroup) |
| Texture * | OpenGLRenderer::createTexture (float size) |
| void | OpenGLRenderer::destroyTexture (Texture *texture) |
| virtual ushort CEGUI::OpenGLTexture::getHeight | ( | void | ) | const [inline, virtual] |
Returns the current pixel height of the texture.
Implements CEGUI::Texture.
| GLuint CEGUI::OpenGLTexture::getOGLTexid | ( | void | ) | const [inline] |
| virtual ushort CEGUI::OpenGLTexture::getOriginalHeight | ( | void | ) | const [inline, virtual] |
Returns the original pixel height of the data loaded into the texture.
Reimplemented from CEGUI::Texture.
| virtual ushort CEGUI::OpenGLTexture::getOriginalWidth | ( | void | ) | const [inline, virtual] |
Returns the original pixel width of the data loaded into the texture.
Reimplemented from CEGUI::Texture.
| virtual ushort CEGUI::OpenGLTexture::getWidth | ( | void | ) | const [inline, virtual] |
Returns the current pixel width of the texture.
Implements CEGUI::Texture.
| virtual float CEGUI::OpenGLTexture::getXScale | ( | void | ) | const [inline, virtual] |
Returns the current scale used for the width of the texture.
Reimplemented from CEGUI::Texture.
| virtual float CEGUI::OpenGLTexture::getYScale | ( | void | ) | const [inline, virtual] |
Returns the current scale used for the height of the texture.
Reimplemented from CEGUI::Texture.
| void CEGUI::OpenGLTexture::loadFromFile | ( | const String & | filename, | |
| const String & | resourceGroup | |||
| ) | [virtual] |
Loads the specified image file into the texture. The texture is resized as required to hold the image.
| filename | The filename of the image file that is to be loaded into the texture | |
| resourceGroup | Resource group identifier passed to the resource provider. |
Implements CEGUI::Texture.
References CEGUI::ImageCodec::getIdentifierString(), CEGUI::OpenGLRenderer::getImageCodec(), CEGUI::Texture::getRenderer(), CEGUI::System::getResourceProvider(), CEGUI::System::getSingleton(), CEGUI::ImageCodec::load(), CEGUI::ResourceProvider::loadRawDataContainer(), and CEGUI::ResourceProvider::unloadRawDataContainer().
Referenced by CEGUI::OpenGLRenderer::createTexture().
| void CEGUI::OpenGLTexture::loadFromMemory | ( | const void * | buffPtr, | |
| uint | buffWidth, | |||
| uint | buffHeight, | |||
| Texture::PixelFormat | pixFormat | |||
| ) | [virtual] |
Loads (copies) an image in memory into the texture. The texture is resized as required to hold the image.
| buffPtr | Pointer to the buffer containing the image data | |
| buffWidth | Width of the buffer (in pixels as specified by pixelFormat ) | |
| buffHeight | Height of the buffer (in pixels as specified by pixelFormat ) | |
| pixelFormat | PixelFormat value describing the format contained in buffPtr |
Implements CEGUI::Texture.
References CEGUI::Texture::PF_RGB, CEGUI::Texture::PF_RGBA, and setOGLTextureSize().
| void CEGUI::OpenGLTexture::setOGLTextureSize | ( | uint | size | ) |
set the size of the internal texture.
| size | pixel size of the new internal texture. This will be rounded up to a power of 2. |
Referenced by CEGUI::OpenGLRenderer::createTexture(), and loadFromMemory().
1.5.7.1