Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
EngineCore::TextureAsset Class Reference

Wrapper for texture data. More...

#include <TextureAsset.h>

Inheritance diagram for EngineCore::TextureAsset:
Collaboration diagram for EngineCore::TextureAsset:

Public Member Functions

 TextureAsset (bool initEcsData=false)
 ~TextureAsset () override=default
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)
virtual ~AssetBase ()
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.

Friends

class AssetManager

Additional Inherited Members

Protected Attributes inherited from Asset::AssetBase
CpuLoadingState loadingState = UNLOADED
entt::registry & mainRegistry
entt::entity data

Detailed Description

Wrapper for texture data.

Author
Konstantin Passig
Date
03.12.2025

Definition at line 14 of file TextureAsset.h.

Constructor & Destructor Documentation

◆ TextureAsset()

EngineCore::TextureAsset::TextureAsset ( bool initEcsData = false)
explicit

Definition at line 13 of file TextureAsset.cpp.

References Asset::AssetBase::AssetBase().

Referenced by EngineCore::GltfTextureAsset::GltfTextureAsset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~TextureAsset()

EngineCore::TextureAsset::~TextureAsset ( )
overridedefault

Member Function Documentation

◆ setImage()

void EngineCore::TextureAsset::setImage ( tinygltf::Image && image)

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

Parameters
imageimage to move
Author
Konstantin Passig
Date
03.12.2025

Definition at line 18 of file TextureAsset.cpp.

References Asset::AssetBase::data, Ecs::ImageData::image, Asset::AssetBase::mainRegistry, TRACY_ZONE_SCOPED_NAMED, and updateLoadingState().

Here is the call graph for this function:

◆ unload()

void EngineCore::TextureAsset::unload ( )
overridevirtual

unloads all data of this asset

Author
Konstantin Passig
Date
03.12.2025

Reimplemented from Asset::AssetBase.

Definition at line 35 of file TextureAsset.cpp.

◆ updateLoadingState()

void EngineCore::TextureAsset::updateLoadingState ( )
overridevirtual

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

Author
Konstantin Passig
Date
03.12.2025

Reimplemented from Asset::AssetBase.

Definition at line 40 of file TextureAsset.cpp.

References Asset::AssetBase::data, Asset::LOADED, Asset::LOADING, Asset::AssetBase::loadingState, Asset::AssetBase::mainRegistry, and Asset::UNLOADED.

Referenced by setImage().

Here is the caller graph for this function:

◆ AssetManager

friend class AssetManager
friend

Definition at line 15 of file TextureAsset.h.

References AssetManager.

Referenced by AssetManager.


The documentation for this class was generated from the following files:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Texture/TextureAsset.h
  • /home/magerbeton/Documents/gl3-vulkan/Engine/src/Engine/Texture/TextureAsset.cpp