Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
nirt::video::IImageLoader Class Referenceabstract

Class which is able to create a image from a file. More...

#include <nirtcpp/core/engine/IImageLoader.hpp>

Inheritance diagram for nirt::video::IImageLoader:
Inheritance graph
Collaboration diagram for nirt::video::IImageLoader:
Collaboration graph

Public Member Functions

virtual bool isALoadableFileExtension (const io::path &filename) const =0
 Check if the file might be loaded by this class.
 
virtual bool isALoadableFileFormat (io::IReadFile *file) const =0
 Check if the file might be loaded by this class.
 
virtual IImageloadImage (io::IReadFile *file) const =0
 Creates a surface from the file.
 
virtual core::array< IImage * > loadImages (io::IReadFile *file, E_TEXTURE_TYPE *type) const
 Creates a multiple surfaces from the file eg. whole cube map.
 
- Public Member Functions inherited from nirt::IReferenceCounted
 IReferenceCounted ()
 Constructor.
 
virtual ~IReferenceCounted ()
 Destructor.
 
void grab () const
 Grabs the object. Increments the reference counter by one.
 
bool drop () const
 Drops the object. Decrements the reference counter by one.
 
s32 getReferenceCount () const
 Get the reference count.
 
const c8getDebugName () const
 Returns the debug name of the object.
 

Additional Inherited Members

- Protected Member Functions inherited from nirt::IReferenceCounted
void setDebugName (const c8 *newName)
 Sets the debug name of the object.
 

Detailed Description

Class which is able to create a image from a file.

If you want the Nirtcpp Engine be able to load textures of currently unsupported file formats (e.g .gif), then implement this and add your new Surface loader with IVideoDriver::addExternalImageLoader() to the engine.

Member Function Documentation

◆ isALoadableFileExtension()

virtual bool nirt::video::IImageLoader::isALoadableFileExtension ( const io::path filename) const
pure virtual

Check if the file might be loaded by this class.

Check is based on the file extension (e.g. ".tga")

Parameters
filenameName of file to check.
Returns
True if file seems to be loadable.

◆ isALoadableFileFormat()

virtual bool nirt::video::IImageLoader::isALoadableFileFormat ( io::IReadFile file) const
pure virtual

Check if the file might be loaded by this class.

Check might look into the file.

Parameters
fileFile handle to check.
Returns
True if file seems to be loadable.

◆ loadImage()

virtual IImage * nirt::video::IImageLoader::loadImage ( io::IReadFile file) const
pure virtual

Creates a surface from the file.

Parameters
fileFile handle to check.
Returns
Pointer to newly created image, or 0 upon error.

◆ loadImages()

virtual core::array< IImage * > nirt::video::IImageLoader::loadImages ( io::IReadFile file,
E_TEXTURE_TYPE type 
) const
inlinevirtual

Creates a multiple surfaces from the file eg. whole cube map.

Parameters
fileFile handle to check.
typePointer to E_TEXTURE_TYPE where a recommended type of the texture will be stored.
Returns
Array of pointers to newly created images.

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

Nirtcpp    @cppfx.xyz

Esvcpp    esv::print