TextureManager::CreateTexture

TextureManager::CreateTexture
virtual Render::Texture* CreateTexture(VkImage image, VkFormat format, const ImageSize& size, VkDeviceMemory memory = VK_NULL_HANDLE);
virtual Render::Texture* CreateTexture(ImageFormat format, unsigned mipLevels, const ImageSize& size, unsigned use, ImageBase* pimage = 0, Render::MemoryManager* allocManager = 0) override;
Description

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

Parameters
Parameters 
Description 
VkFormat format 
The format of the source image, see ImageFormat
const ImageSize& size 
The size of the image used to create a texture. 
unsigned mipLevels 
Mipmap levels of the 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* allocManager = 0 
Memory manager for swapping support. 
Return Value

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