Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
Grindstone::Editor::ThumbnailManager Class Reference

Classes

struct  AtlasCoords
struct  IconData

Public Member Functions

void RegisterGenerator (AssetType type, ThumbnailGenerateFn generator)
void DeregisterGenerator (AssetType type, ThumbnailGenerateFn generator)
bool Initialize ()
Grindstone::GraphicsAPI::DescriptorSetGetAtlasTextureDescriptorSet ()
AtlasCoords GetCoordsByIndex (uint32_t index) const
AtlasCoords GetFolderIconCoords () const
AtlasCoords GetGenericBinaryIconCoords () const
AtlasCoords GetPluginIconCoords () const
AtlasCoords GetDotnetIconCoords () const
AtlasCoords GetCmakeIconCoords () const
AtlasCoords GetThumbnailCoordsFromCache (AssetType type, Grindstone::Uuid uuid)
bool FreeThumbnailFromMemory (Grindstone::Uuid uuid)
ThumbnailManager::AtlasCoords RequestThumbnail (AssetType type, Grindstone::Uuid uuid)
bool DeleteThumbnailFromStorage (Grindstone::Uuid uuid)
void CreateRequestedThumbnails ()

Protected Types

enum class  IconStatus {
  Pending , Failed , Loading , Generating ,
  Resolved
}

Protected Member Functions

uint16_t LoadDdsBufferToAtlas (std::string_view name, Grindstone::Containers::BufferSpan inputBuffer)
uint16_t LoadNamedAssetToAtlas (std::string_view name)
uint16_t LoadThumbnailByPathToAtlas (const std::filesystem::path &path)

Protected Attributes

std::unordered_map< AssetType, ThumbnailGenerateFn > generators
std::unordered_map< Grindstone::Uuid, IconDataiconsByUuid
std::vector< std::pair< Grindstone::AssetType, Grindstone::Uuid > > requestedThumbnails
Grindstone::GraphicsAPI::ImagethumbnailAtlasImage = nullptr
Grindstone::GraphicsAPI::DescriptorSetthumbnailAtlasDescriptorSet = nullptr
std::vector< uint16_t > freeIndices
struct { 
   uint16_t   folder 
   uint16_t   plugin 
   uint16_t   generic 
   uint16_t   dotnet 
   uint16_t   cmake 
   uint16_t   asset [static_cast< size_t >
      (AssetType::Count)] 
defaultIcons
uint32_t thumbnailFreeCount = 0
uint32_t thumbnailCapacity = 0
uint32_t thumbnailPixelSize = 0
uint32_t atlasPixelWidth = 0
uint32_t atlasPixelHeight = 0
uint32_t thumbnailsPerAtlasRow = 0

The documentation for this class was generated from the following files:
  • /github/workspace/sources/code/Editor/ThumbnailManager.hpp
  • /github/workspace/sources/code/Editor/ThumbnailManager.cpp