18#ifndef INCLUDED_TEXTURECONVERTER
19#define INCLUDED_TEXTURECONVERTER
Texture conversion helper class.
Definition: TextureConverter.h:70
bool IsBusy() const
The TextureConverter shouldn't utilize the CPU/Memory fully, so no conversion should be started when ...
Definition: TextureConverter.cpp:530
CTextureConverter(PIVFS vfs, bool highQuality)
Construct texture converter, for use with files in the given vfs.
Definition: TextureConverter.cpp:304
ENormalMap
Definition: TextureConverter.h:90
@ NORMAL_FALSE
Definition: TextureConverter.h:93
@ NORMAL_UNSPECIFIED
Definition: TextureConverter.h:91
@ NORMAL_TRUE
Definition: TextureConverter.h:92
EFormat
Definition: TextureConverter.h:73
@ FMT_DXT3
Definition: TextureConverter.h:76
@ FMT_RGBA
Definition: TextureConverter.h:78
@ FMT_DXT1
Definition: TextureConverter.h:75
@ FMT_ALPHA
Definition: TextureConverter.h:79
@ FMT_UNSPECIFIED
Definition: TextureConverter.h:74
@ FMT_DXT5
Definition: TextureConverter.h:77
std::queue< Future< std::unique_ptr< ConversionResult > > > m_ResultQueue
Definition: TextureConverter.h:213
~CTextureConverter()
The destructor does wait for already started tasks.
EMipmap
Definition: TextureConverter.h:83
@ MIP_TRUE
Definition: TextureConverter.h:85
@ MIP_UNSPECIFIED
Definition: TextureConverter.h:84
@ MIP_FALSE
Definition: TextureConverter.h:86
SettingsFile * LoadSettings(const VfsPath &path) const
Load a texture conversion settings XML file.
Definition: TextureConverter.cpp:122
EAlpha
Definition: TextureConverter.h:97
@ ALPHA_PLAYER
Definition: TextureConverter.h:100
@ ALPHA_UNSPECIFIED
Definition: TextureConverter.h:98
@ ALPHA_TRANSPARENCY
Definition: TextureConverter.h:101
@ ALPHA_NONE
Definition: TextureConverter.h:99
EFilter
Definition: TextureConverter.h:105
@ FILTER_UNSPECIFIED
Definition: TextureConverter.h:106
@ FILTER_BOX
Definition: TextureConverter.h:107
@ FILTER_KAISER
Definition: TextureConverter.h:109
@ FILTER_TRIANGLE
Definition: TextureConverter.h:108
Settings ComputeSettings(const std::wstring &filename, const std::vector< SettingsFile * > &settingsFiles) const
Match a sequence of settings files against a given texture filename, and return the resulting setting...
Definition: TextureConverter.cpp:252
bool m_HighQuality
Definition: TextureConverter.h:208
PIVFS m_VFS
Definition: TextureConverter.h:207
bool Poll(CTexturePtr &texture, VfsPath &dest, bool &ok)
Returns the result of a successful ConvertTexture call.
Definition: TextureConverter.cpp:488
bool ConvertTexture(const CTexturePtr &texture, const VfsPath &src, const VfsPath &dest, const Settings &settings)
Begin converting a texture, using the given settings.
Definition: TextureConverter.cpp:316
MD5 hashing algorithm.
Definition: MD5.h:28
std::shared_ptr< CTexture > CTexturePtr
Definition: Texture.h:23
Definition: vfs_util.cpp:39
Response from the asynchronous task.
Definition: TextureConverter.cpp:101
Representation of <File> line from settings XML file.
Definition: TextureConverter.h:143
Settings settings
Definition: TextureConverter.h:145
std::wstring pattern
Definition: TextureConverter.h:144
Representation of settings XML file.
Definition: TextureConverter.h:152
std::vector< Match > patterns
Definition: TextureConverter.h:153
Texture conversion settings.
Definition: TextureConverter.h:116
EFilter filter
Definition: TextureConverter.h:133
EFormat format
Definition: TextureConverter.h:129
EAlpha alpha
Definition: TextureConverter.h:132
ENormalMap normal
Definition: TextureConverter.h:131
EMipmap mipmap
Definition: TextureConverter.h:130
float kaiserAlpha
Definition: TextureConverter.h:135
void Hash(MD5 &hash)
Append this object's state to the given hash.
Definition: TextureConverter.cpp:110
Settings()
Definition: TextureConverter.h:117
float kaiserStretch
Definition: TextureConverter.h:136
float kaiserWidth
Definition: TextureConverter.h:134
std::shared_ptr< IVFS > PIVFS
Definition: vfs.h:220