27struct physics_material;
33class rendering_system;
43 using clock = std::chrono::steady_clock;
87 return thumbnails_.file.
get();
117 struct thumbnail_cache
156 std::map<std::string, asset_handle<gfx::texture>> icons_;
157 std::map<std::string, asset_handle<gfx::texture>> gizmo_icons_;
160 void commit_pending_snapshots();
163 void evict_unused_thumbnails(std::chrono::seconds scan_interval, std::chrono::seconds idle_timeout);
166 fs::path cache_directory_{};
169 clock::time_point last_eviction_scan_{clock::now()};
171 std::shared_ptr<int> sentinel_ = std::make_shared<int>(0);
175#define DECLARE_THUMBNAIL_SPEC(T) template<>\
176auto thumbnail_manager::get_thumbnail<T>(const asset_handle<T>& asset) -> gfx::texture::ptr;
std::shared_ptr< texture > ptr
Base class for materials used in rendering.
Main class representing a 3D mesh with support for different LODs, submeshes, and skinning.
Base class for different rendering paths in the ACE framework.
std::chrono::duration< float > delta_t
Thread-safe handle to an asset.
auto get(bool wait=true) const -> std::shared_ptr< T >
Gets the shared pointer to the asset.
Struct representing an animation.
Struct representing an audio clip.
Represents the physical properties of a material.
Represents a generic prefab with a buffer for serialized data.
Represents a scene-specific prefab. Inherits from the generic prefab structure.
Represents a scene in the ACE framework, managing entities and their relationships.
Represents a UI style sheet asset (CSS/RCSS document).
clock::time_point last_access_time
gfx::texture::ptr snapshot
Owned snapshot copied from the preview OBUFFER (not a live render target).
gfx::texture::ptr pending_snapshot
Queued during capture; committed after gfx::frame() so the GPU blit has finished.
auto get() -> gfx::texture::ptr
void set(gfx::texture::ptr tex)
std::map< hpp::uuid, generated_thumbnail > thumbnails
std::array< scene, 3 > scenes
auto get_scene() -> scene &
void reset(rendering_system &rpath)
void invalidate_cache_entry(const hpp::uuid &uid)
Invalidates a cached thumbnail on disk.
auto load_cached_thumbnail(const hpp::uuid &uid) -> gfx::texture::ptr
Loads a cached thumbnail from disk (stub – returns nullptr for now).
auto init(rtti::context &ctx) -> bool
auto get_thumbnail(const asset_handle< T > &asset) -> gfx::texture::ptr
std::chrono::steady_clock clock
auto deinit(rtti::context &ctx) -> bool
void set_cache_directory(const fs::path &cache_dir)
Sets the directory for persistent thumbnail caching.
void save_thumbnail_to_cache(const hpp::uuid &uid, gfx::texture::ptr tex)
Saves a generated thumbnail to disk (stub – no-op for now).
auto get_gizmo_icon(entt::handle e) -> gfx::texture::ptr
void on_frame_update(rtti::context &ctx, delta_t)
void on_frame_end(rtti::context &ctx, delta_t)
void remove_thumbnail(const hpp::uuid &uid)
void regenerate_thumbnail(const hpp::uuid &uid)
auto get_cache_path(const hpp::uuid &uid) const -> fs::path
Gets the disk cache path for a given asset uid.
Represents a UI visual tree asset (HTML/RML document).
#define DECLARE_THUMBNAIL_SPEC(T)