TextureManager::CreateTexture

TextureManager::CreateTexture
virtual Render::Texture* CreateTexture(ImageFormat format, unsigned mipLevels, const ImageSize& size, unsigned use, ImageBase* pimage, Render::MemoryManager* manager = 0);
virtual Render::Texture* CreateTexture(IDirect3DTexture9* pd3dtexture, ImageSize imgSize = ImageSize(0), Image* pimage = 0);
Description

CreateTexture creates a texture object from a platform specific texture handle, which has already been allocated by the user.

Parameters
Parameters 
Description 
ImageFormat format 
The format of the source image, see ImageFormat
unsigned mipLevels 
Mipmap levels of the texture. 
const ImageSize& size 
The size of the image used to create a texture. 
unsigned use 
Sets the texture usage capabilities passed to the renderer, see ImageUse
ImageBase* pimage 
Pointer to the image content used to initialize texture data. 
Render::MemoryManager* manager = 0 
Memory manager for swapping support. 
IDirect3DTexture9* pd3dtexture 
A platform-specific texture handle. 
ImageSize imgSize = ImageSize(0) 
The size of the image used to create a texture. 
Return Value

A Texture pointer to the created texture, null if texture creation failed.