#include <ImageLoader.h>
|
|
using | ImageArray = std::array< Array2D< unsigned char >, 6 > |
| |
ImageLoader class is used to load images from disk. Also it contains methods to create cubemaps from their scans
§ CreateCubemap()
| ImageLoader::ImageArray MxEngine::ImageLoader::CreateCubemap |
( |
const Image & |
image | ) |
|
|
static |
creates cubemap projections from its scan: X XXXX X
- Parameters
-
| image | image from which cubemap will be created |
- Returns
- 6 2d arrays of raw image data (can be passed as individual images to OpenGL)
§ LoadImage()
| Image MxEngine::ImageLoader::LoadImage |
( |
const MxString & |
filepath, |
|
|
bool |
flipImage = true |
|
) |
| |
|
static |
loads image from disk. As OpenGL treats images differently as expected, all images are flipped automatically
- Parameters
-
| filepath | path to an image on disk |
| flipImage | should the image be vertically flipped. As MxEngine uses primarily OpenGL, usually you want to do this |
- Returns
- Image object if image file exists or nullptr data and width = height = channels = 0 if not
The documentation for this class was generated from the following files:
- src/Utilities/Image/ImageLoader.h
- src/Utilities/Image/ImageLoader.cpp