diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/irrlicht-1.8.1/include/IImageLoader.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8.1/include/IImageLoader.h b/libraries/irrlicht-1.8.1/include/IImageLoader.h new file mode 100644 index 0000000..5ff091d --- /dev/null +++ b/libraries/irrlicht-1.8.1/include/IImageLoader.h | |||
@@ -0,0 +1,53 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | ||
2 | // This file is part of the "Irrlicht Engine". | ||
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | ||
4 | |||
5 | #ifndef __I_SURFACE_LOADER_H_INCLUDED__ | ||
6 | #define __I_SURFACE_LOADER_H_INCLUDED__ | ||
7 | |||
8 | #include "IReferenceCounted.h" | ||
9 | #include "IImage.h" | ||
10 | #include "path.h" | ||
11 | |||
12 | namespace irr | ||
13 | { | ||
14 | namespace io | ||
15 | { | ||
16 | class IReadFile; | ||
17 | } // end namespace io | ||
18 | namespace video | ||
19 | { | ||
20 | |||
21 | //! Class which is able to create a image from a file. | ||
22 | /** If you want the Irrlicht Engine be able to load textures of | ||
23 | currently unsupported file formats (e.g .gif), then implement | ||
24 | this and add your new Surface loader with | ||
25 | IVideoDriver::addExternalImageLoader() to the engine. */ | ||
26 | class IImageLoader : public virtual IReferenceCounted | ||
27 | { | ||
28 | public: | ||
29 | |||
30 | //! Check if the file might be loaded by this class | ||
31 | /** Check is based on the file extension (e.g. ".tga") | ||
32 | \param filename Name of file to check. | ||
33 | \return True if file seems to be loadable. */ | ||
34 | virtual bool isALoadableFileExtension(const io::path& filename) const = 0; | ||
35 | |||
36 | //! Check if the file might be loaded by this class | ||
37 | /** Check might look into the file. | ||
38 | \param file File handle to check. | ||
39 | \return True if file seems to be loadable. */ | ||
40 | virtual bool isALoadableFileFormat(io::IReadFile* file) const = 0; | ||
41 | |||
42 | //! Creates a surface from the file | ||
43 | /** \param file File handle to check. | ||
44 | \return Pointer to newly created image, or 0 upon error. */ | ||
45 | virtual IImage* loadImage(io::IReadFile* file) const = 0; | ||
46 | }; | ||
47 | |||
48 | |||
49 | } // end namespace video | ||
50 | } // end namespace irr | ||
51 | |||
52 | #endif | ||
53 | |||