virtual Render::Texture* CreateTexture(id<MTLTexture> texture, Image* image = 0); virtual Render::Texture* CreateTexture(ImageFormat format, unsigned mipLevels, const ImageSize& size, unsigned use, ImageBase* pimage = 0, Render::MemoryManager* manager = 0);
CreateTexture creates a texture object from a platform specific texture handle, which has already been allocated by the user.
|
Parameters |
Description |
|
id<MTLTexture> texture |
A platform specific texture handle. |
|
Image* image = 0 |
The image content used to initialize texture data. |
|
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 = 0 |
Pointer to the image content used to initialize texture data. |
|
Render::MemoryManager* manager = 0 |
Memory manager for swapping support. |
A Texture pointer to the created texture, null if texture creation failed.