Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Assets::Texture Class Reference

Wrapper for texture data. More...

#include <TextureAsset.h>

Inheritance diagram for Engine::Assets::Texture:
Collaboration diagram for Engine::Assets::Texture:

Public Member Functions

 Texture (bool initEcsData=false)
 Creates a texture asset.
 ~Texture () override=default
 Destroys the texture asset.
void setImage (tinygltf::Image &&image)
 sets the image data to an image. The image data will be moved into this asset
void unload () override
 unloads all data of this asset
void updateLoadingState () override
 updates the loading state according to all components required by this asset
Public Member Functions inherited from Asset::AssetBase
 AssetBase (bool initializeDefaultEntity=false)
 Creates a base asset and optionally allocates its default ECS entity.
virtual ~AssetBase ()
 Releases base asset resources.
CpuLoadingState getLoadingState ()
 Gets the loading state of this asset.
void requestLoad ()
 If this asset is in the UNLOADED state it will get added to the assets to load.
entt::entity getEntity () const
 Getter for data.

Additional Inherited Members

Protected Attributes inherited from Asset::AssetBase
CpuLoadingState loadingState = UNLOADED
 Current CPU loading state.
entt::registry & mainRegistry
 Registry that owns this asset's ECS data.
entt::entity data
 Entity containing the asset's component data.

Detailed Description

Wrapper for texture data.

Definition at line 17 of file TextureAsset.h.

Constructor & Destructor Documentation

◆ Texture()

Engine::Assets::Texture::Texture ( bool initEcsData = false)
explicit

Creates a texture asset.

Parameters
initEcsDataWhether to create backing ECS data immediately.

◆ ~Texture()

Engine::Assets::Texture::~Texture ( )
overridedefault

Destroys the texture asset.

Member Function Documentation

◆ setImage()

void Engine::Assets::Texture::setImage ( tinygltf::Image && image)

sets the image data to an image. The image data will be moved into this asset

Parameters
imageimage to move

◆ unload()

void Engine::Assets::Texture::unload ( )
overridevirtual

unloads all data of this asset

Reimplemented from Asset::AssetBase.

◆ updateLoadingState()

void Engine::Assets::Texture::updateLoadingState ( )
overridevirtual

updates the loading state according to all components required by this asset

Reimplemented from Asset::AssetBase.


The documentation for this class was generated from the following file:
  • /workspace/magerbeton/gl3-vulkan/code/Engine/include/Engine/Texture/TextureAsset.h