Ocular Engine
Ocular::Graphics::TextureResourceLoader_PNG Class Reference
Inheritance diagram for Ocular::Graphics::TextureResourceLoader_PNG:
Ocular::Graphics::TextureResourceLoader Ocular::Core::AResourceLoader

Protected Member Functions

virtual bool readFile (Core::File const &file, std::vector< Core::Color > &pixels, unsigned &width, unsigned &height)
 
- Protected Member Functions inherited from Ocular::Graphics::TextureResourceLoader
virtual bool createResource (Core::Resource *&resource, Core::File const &file, std::vector< Core::Color > const &pixels, unsigned const &width, unsigned const &height)
 
virtual void loadFileIntoBuffer (Core::File const &file, std::vector< unsigned char > &buffer, Endianness fileEndianness)
 
- Protected Member Functions inherited from Ocular::Core::AResourceLoader
bool isFileValid (Core::File const &file) const
 

Additional Inherited Members

- Public Member Functions inherited from Ocular::Graphics::TextureResourceLoader
 TextureResourceLoader (std::string const &extension)
 
virtual bool loadResource (Core::Resource *&resource, Core::File const &file, std::string const &mappingName) override
 
- Public Member Functions inherited from Ocular::Core::AResourceLoader
 AResourceLoader (std::string const &extension, ResourceType type)
 
virtual std::string getSupportedFileType () const
 
virtual bool loadSubResource (Resource *&resource, File const &file, std::string const &mappingName)
 
virtual bool exploreResource (File const &file)
 
ResourceType getResourceType () const
 
- Protected Attributes inherited from Ocular::Core::AResourceLoader
std::string m_SupportedExtension
 
ResourceType m_Type
 

Member Function Documentation

bool Ocular::Graphics::TextureResourceLoader_PNG::readFile ( Core::File const &  file,
std::vector< Core::Color > &  pixels,
unsigned &  width,
unsigned &  height 
)
protectedvirtual

Each TextureResourceLoader must provide a custom implementation for it's specific file type.

Parameters
[in]fileSource file to read from.
[out]pixelsTexture pixel data read in from the file.
[out]widthWidth of the texture.
[out]heightHeight of the texture.
Returns
TRUE if file was read in successfully.

Implements Ocular::Graphics::TextureResourceLoader.


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