The VgITextureManager class is used to create VgITexture given a VgBinaryBuffer.
More...
The VgITextureManager class is used to create VgITexture given a VgBinaryBuffer.
The VgITextureManager class is in charge of passing the VgBinaryBuffer data to the graphics engine and creates internal objects that allows usage of the returned texture.
The below code snippet demonstrates how a VgITexture can be created.
...
VgApplication::VgIApplication* mVgApplication;
...
VgEngine::VgRefPtr<
VgEngine::VgBinaryBuffer > lBuffer = mVgApplication->editEngine()->editResourceManager()->readFromFileOrURL(
"/path/to/file.png");
mTexture = lTexture.
get();
...
- Date
- 25/02/2010
VgEngine::VgITextureManager::VgITextureManager |
( |
| ) |
|
|
inlineprotected |
virtual VgEngine::VgITextureManager::~VgITextureManager |
( |
| ) |
|
|
inlinevirtual |
Creates a Texture from a VgBinaryBuffer.
- Parameters
-
pBuffer | The buffer from where the texture will be loaded. |
pGenerateMipmaps | Indicates whether mipmaps should be auto-generated. |
- Textures should be square and the width and height should be a power of two to avoid having problems on certain devices.
- Version
- 2.0.8955
Creates a buffer that can receive an image with the specific pixel format.
- Parameters
-
| pWidth | width of the image |
| pHeight | height of the image |
| pPixelFormat | the pixel format to use. |
[out] | pOutData | pointer that will be updated and that will later receive the image width*height*4*sizeof(char). This is done to minimize copies. |
- Before creating a texture using the returned VgBinaryBuffer, pOutData should first be populate in the format of the specified pixel format.
- The result of doing getData() on the resulting buffer will not be the same thing as pOutData. pOutData is where the image data will live, whereas getData() returns what will be delete[]d and includes additional information such as the PVR texture header.
- Version
- 2.0
The documentation for this interface was generated from the following file: