Ocular Engine
Ocular::Graphics::TextureResourceLoader_BMP Class Reference

#include <TextureResourceLoader_BMP.hpp>

Inheritance diagram for Ocular::Graphics::TextureResourceLoader_BMP:
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

Detailed Description

Implementation of AResourceLoader that handles the loading of files with the '.bmp' extension as uncompressed 24/32-bit bitmap images.

These files are loaded as a Texture2D.

Member Function Documentation

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

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

[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.
TRUE if file was read in successfully.

Implements Ocular::Graphics::TextureResourceLoader.

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