![]() |
vkmEngine 1.0.0
A C++ game engine · vkmengine.com
|
Texture asset combining Resource tracking with engine-level texture parameters. More...
#include <texture_asset.h>
Public Member Functions | |
| bool | isSrgb () const |
| Whether the texture stores colour in sRGB. | |
| TextureUsage | usage () const |
| What the texels mean, read off the internal format as isSrgb is. | |
| Public Member Functions inherited from Vkm::Engine::Resource | |
| Resource (const Resource &other) | |
Duplicate other's contents and name, but not its identity. | |
| const std::string & | name () const noexcept |
| Serializable identity; non-empty and unique within its type once added. | |
| uint64_t | uid () const noexcept |
| Process-unique id stamped by add(); names the asset, not the slot it sits in. | |
| uint64_t | version () const noexcept |
| Change counter the backend keys GPU re-uploads on; moved by commit(). | |
| bool | isHidden () const noexcept |
| Added by ResourceManager::addPrivate: not user-facing, not saved. | |
| nlohmann::json & | sourceJson () |
| Mutable source JSON, allocating a null document if there is none. | |
| const nlohmann::json & | sourceJson () const |
| Const source JSON; asserts hasSource(), so guard the call with it. | |
Public Attributes | |
| std::vector< uint8_t > | pixelData = {} |
| bool | loading = false |
| True while an async decode is in flight; AsyncLoaderSystem clears it. | |
Texture asset combining Resource tracking with engine-level texture parameters.
|
inline |
Whether the texture stores colour in sRGB.
Read off the internal format, which a decode in flight already carries.
|
inline |
What the texels mean, read off the internal format as isSrgb is.
| std::vector<uint8_t> Vkm::Engine::TextureAsset::pixelData = {} |
Every level params.mipLevels names, level 0 first, tightly packed: texels, or 4x4 blocks for a BC format.