Wasabi
Public Member Functions | Friends | List of all members
WImageManager Class Reference

#include <WImage.hpp>

Inheritance diagram for WImageManager:
WManager< WImage >

Public Member Functions

 WImageManager (class Wasabi *const app)
 
WError Load ()
 
WImageCreateImage (uint32_t ID=0)
 
WImageCreateImage (void *pixels, uint32_t width, uint32_t height, VkFormat format, W_IMAGE_CREATE_FLAGS flags=W_IMAGE_CREATE_TEXTURE, uint32_t ID=0)
 
WImageCreateImage (std::string filename, W_IMAGE_CREATE_FLAGS flags=W_IMAGE_CREATE_TEXTURE, uint32_t ID=0)
 
WImageCreateImage (WImage *const image, W_IMAGE_CREATE_FLAGS flags=W_IMAGE_CREATE_TEXTURE, uint32_t ID=0)
 
WImageGetDefaultImage () const
 
void UpdateDynamicImages (uint32_t bufferIndex) const
 
- Public Member Functions inherited from WManager< WImage >
 WManager (class Wasabi *const a)
 
bool RegisterChangeCallback (std::string name, std::function< void(WImage *, bool)> callback)
 
void RemoveChangeCallback (std::string name)
 
void AddEntity (WImage *entity)
 
bool RemoveEntity (WImage *entity)
 
void OnEntityNameChanged (WImage *entity, std::string oldName)
 
virtual void Init ()
 
WImageGetEntity (uint32_t ID) const
 
WImageGetEntity (std::string name) const
 
WImageGetEntityByIndex (uint32_t index) const
 
uint32_t GetEntitiesCount (void) const
 

Friends

class WImage
 

Additional Inherited Members

- Public Attributes inherited from WManager< WImage >
class Wasabi *const m_app
 
- Protected Attributes inherited from WManager< WImage >
std::vector< WImage * > m_entities [W_HASHTABLESIZE]
 
std::unordered_map< std::string, WImage * > m_entitiesByName
 

Detailed Description

Manager class for WCamera.

Member Function Documentation

◆ CreateImage() [1/4]

WImage* WImageManager::CreateImage ( std::string  filename,
W_IMAGE_CREATE_FLAGS  flags = W_IMAGE_CREATE_TEXTURE,
uint32_t  ID = 0 
)

Allocates and builds a new image from a file. See WImage::Load().

◆ CreateImage() [2/4]

WImage* WImageManager::CreateImage ( uint32_t  ID = 0)

Allocates an image.

◆ CreateImage() [3/4]

WImage* WImageManager::CreateImage ( void *  pixels,
uint32_t  width,
uint32_t  height,
VkFormat  format,
W_IMAGE_CREATE_FLAGS  flags = W_IMAGE_CREATE_TEXTURE,
uint32_t  ID = 0 
)

Allocates and builds a new image from supplied pixels. See WImage::CreateFromPixelsArray().

◆ CreateImage() [4/4]

WImage* WImageManager::CreateImage ( WImage *const  image,
W_IMAGE_CREATE_FLAGS  flags = W_IMAGE_CREATE_TEXTURE,
uint32_t  ID = 0 
)

Allocates and builds a new image that is a copy of another. See WImage::CopyFrom().

◆ GetDefaultImage()

WImage* WImageManager::GetDefaultImage ( ) const

Retrieves the default (checkers) image.

Returns
A pointer to the default image

◆ Load()

WError WImageManager::Load ( )

Loads the manager and creates the default checker image.

Returns
Error code, see WError.h

◆ UpdateDynamicImages()

void WImageManager::UpdateDynamicImages ( uint32_t  bufferIndex) const

Makes sure all Map call results are propagated to the buffered images at the given buffer index.


The documentation for this class was generated from the following file: