static Image* SF_STDCALL Create(ImageFormat format, unsigned mipLevels, const ImageSize& size, unsigned use, MemoryHeap* pheap = 0, TextureManager* pmanager = 0, ImageUpdateSync* pupdateSync = 0);
Create creates a new image of specified size and format and is allocated in the specified memory heap. The new image is created with desired use (ImageUse) capabilities, while also considering the capabilities of the texture manager.
Parameters |
Description |
ImageFormat format |
The image format to use for the data buffer, such as Image_R8G8B8A8 or Image_A8. |
unsigned mipLevels |
Mipmap level for the textures. Use 0 for main (top level) texture. |
const ImageSize& size |
Desired size of the image. |
unsigned use |
The flag set as the capabilities of the image and its associated texture. See ImageUse. |
MemoryHeap* pheap = 0 |
A dedicated memory heap used for storing images. Null if this is a global heap. |
TextureManager* pmanager = 0 |
Pointer to the TextureManager for creating the texture. |
ImageUpdateSync* pupdateSync = 0 |
Pointer to ImageUpdateSync for image updates. |
A Image pointer to the newly created image. This will be null if image data allocation failed.