Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
TextureAsset.h
1#pragma once
2#include "Engine/Core/Asset.h"
3#include "Engine/Files/AssetPath.h"
4#include "ExrLoader.h"
5#include <filesystem>
6#include <tiny_gltf.h>
7
8namespace Engine::Core
9{
10 class AssetManager;
11} // namespace Engine::Core
12
13namespace Engine::Assets {
17 class Texture : public Asset::AssetBase {
18 friend class Core::AssetManager;
19 public:
24 explicit Texture(bool initEcsData = false);
25
29 ~Texture() override = default;
34 void setImage( tinygltf::Image && image );
35
39 void unload() override;
40
44 void updateLoadingState() override;
45 };
46
50 class ExrTextureAsset : public Texture {
51 public:
56
60 ~ExrTextureAsset() override = default;
61
67 };
68
75 class GltfTextureAsset : public Texture {
76 public:
81
85 ~GltfTextureAsset() override = default;
86 };
87
91 class TextureAssetManager : public Asset::AssetManager<Asset::Path, Texture> {
92 public:
97 };
98}
Base class for asset wrappers. The data is stored in the private member variable 'data' in form of en...
Definition Asset.h:297
A manager which is used to look up existing assets and their loading state.
Definition Asset.h:358
~ExrTextureAsset() override=default
Destroys the EXR texture asset.
ExrTextureAsset()
Creates an EXR texture asset.
void setHeader(Textures::ExrHeader &header)
Stores EXR header metadata on the backing ECS entity.
GltfTextureAsset()
Creates a glTF texture asset with backing ECS data initialized.
~GltfTextureAsset() override=default
Destroys the glTF texture asset.
TextureAssetManager()
Creates an empty texture asset manager.
void unload() override
unloads all data of this asset
void setImage(tinygltf::Image &&image)
sets the image data to an image. The image data will be moved into this asset
void updateLoadingState() override
updates the loading state according to all components required by this asset
~Texture() override=default
Destroys the texture asset.
Texture(bool initEcsData=false)
Creates a texture asset.
Coordinates engine asset loading pipelines and runtime texture descriptor ownership.
Wrapper for EXR file header information with owned data.
Definition ExrLoader.h:28