#include <TextureImporter.h>
|
static constexpr const char * | getImportedFileName () |
|
static std::optional< Error > | importTexture (const std::filesystem::path &pathToTexture, TextureImportFormat textureImportFormat, const std::string &sPathToOutputDirRelativeRes, const std::string &sOutputDirectoryName) |
|
Provides static functions for importing files in special formats (such as PNG) as textures into engine formats.
◆ getImportedFileName()
static constexpr const char * ne::TextureImporter::getImportedFileName |
( |
| ) |
|
|
inlinestaticconstexpr |
Returns file name that importer adds before extension to the imported texture file.
- Returns
- File name.
◆ importTexture()
std::optional< Error > ne::TextureImporter::importTexture |
( |
const std::filesystem::path & |
pathToTexture, |
|
|
TextureImportFormat |
textureImportFormat, |
|
|
const std::string & |
sPathToOutputDirRelativeRes, |
|
|
const std::string & |
sOutputDirectoryName |
|
) |
| |
|
static |
Blocks the current thread, converts the specified texture into engine-supported formats and creates new textures in the specified directory relative to res
directory.
- Parameters
-
pathToTexture | Path to the texture image to convert. |
textureImportFormat | Format of the imported texture. |
sPathToOutputDirRelativeRes | Path to a directory relative to the res directory that will store results, for example: game/player/textures (located at res/game/player/textures ). |
sOutputDirectoryName | Name of the new directory that does not exists yet but will be created in the specified directory (relative to the res ) to store the results (allowed characters A-z and numbers 0-9, maximum length is 10 characters), for example: diffuse . |
- Returns
- Error if something went wrong.
◆ pImportedFileName
constexpr auto ne::TextureImporter::pImportedFileName = "t" |
|
staticconstexprprivate |
File name that we add before extension to the imported texture file.
The documentation for this class was generated from the following files:
- src/engine_lib/public/io/TextureImporter.h
- src/engine_lib/private/io/TextureImporter.cpp