Checkpoint 5: complete asset freshness, schema migrations and editor diagnostics
This commit is contained in:
@@ -66,6 +66,9 @@ class AssetPipeline : public AssetStore {
|
||||
explicit AssetPipeline(std::filesystem::path cache_root);
|
||||
ImportResult import_asset(const ImportRequest& request, ImportJob& job);
|
||||
ImportResult import_asset(const ImportRequest& request);
|
||||
// Inspect source/recipe/dependency hashes without importing or changing the
|
||||
// active generation. Only editor tools need source freshness; Player does not.
|
||||
Json freshness(const std::string& asset_id) const;
|
||||
// Overrides are authoring data beside the source, never generated cache contents.
|
||||
Json overrides(const std::string& asset_id) const;
|
||||
void set_overrides(const std::string& asset_id, const Json& overrides);
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
#include <faset/render/renderer.hpp>
|
||||
#include <memory>
|
||||
#include <span>
|
||||
|
||||
namespace faset::editor {
|
||||
// Optional developer diagnostics. This module never edits authoring or runtime state.
|
||||
class DebugOverlay {
|
||||
public:
|
||||
DebugOverlay();
|
||||
~DebugOverlay();
|
||||
DebugOverlay(const DebugOverlay&) = delete;
|
||||
DebugOverlay& operator=(const DebugOverlay&) = delete;
|
||||
bool visible() const;
|
||||
void set_visible(bool);
|
||||
// F12 toggles the overlay; events captured by its widgets are removed for this frame.
|
||||
std::vector<render::Event> process_events(std::span<const render::Event>);
|
||||
void append(render::Snapshot&, const render::Renderer&, float delta_seconds);
|
||||
|
||||
private:
|
||||
struct Impl;
|
||||
std::unique_ptr<Impl> impl_;
|
||||
};
|
||||
} // namespace faset::editor
|
||||
@@ -62,6 +62,12 @@ struct Quad {
|
||||
std::shared_ptr<const Texture> texture{};
|
||||
std::array<float, 4> uv_rect{0, 0, 1, 1};
|
||||
};
|
||||
struct UiTriangles {
|
||||
// Non-indexed triangle list in drawable pixels, rendered after UI quads/text.
|
||||
std::vector<Vertex> vertices;
|
||||
std::shared_ptr<const Texture> texture{};
|
||||
std::array<float, 4> clip_rect{}; // x/y/width/height; zero size uses the full target
|
||||
};
|
||||
struct Text {
|
||||
float x{}, y{};
|
||||
std::string value;
|
||||
@@ -81,6 +87,7 @@ struct Snapshot {
|
||||
// UI coordinates are drawable pixels, top-left origin. Order is preserved per list.
|
||||
std::vector<Quad> ui_quads;
|
||||
std::vector<Text> ui_text;
|
||||
std::vector<UiTriangles> ui_triangles;
|
||||
};
|
||||
// CPU-only validation used before publishing a game or creating Vulkan pipelines.
|
||||
void validate_shader_bundle(const std::filesystem::path& directory);
|
||||
@@ -119,6 +126,8 @@ struct Event {
|
||||
struct FrameStats {
|
||||
std::uint64_t frame{};
|
||||
bool validation_enabled{};
|
||||
bool gpu_labels_enabled{};
|
||||
std::uint32_t gpu_label_count{};
|
||||
// Live VkDeviceMemory allocation sizes, including alignment; excludes driver internals.
|
||||
std::uint64_t gpu_allocated_bytes{};
|
||||
std::uint32_t texture_count{};
|
||||
|
||||
@@ -170,6 +170,8 @@ class Context {
|
||||
void draw(render::Snapshot&);
|
||||
bool update_text(const std::string& id, const std::string& value, bool force = false);
|
||||
bool update_number(const std::string& id, double value, bool force = false);
|
||||
// Reveal the target in enclosing vertical scrollers without changing text
|
||||
// edits; a previous field must commit successfully before focus moves.
|
||||
bool focus(const std::string& id);
|
||||
const std::string& focused_id() const;
|
||||
void clear_focus(bool commit = true);
|
||||
|
||||
Reference in New Issue
Block a user