feat: ImGui docking Editor + 显示链/帧同步/输入语义重构
- App/editor: Hierarchy/Inspector/Viewport/Stats 四面板 + DockBuilder 默认布局,main.cpp 瘦身为场景搭建与生命周期 - 显示链: Tonemap→PresentTarget 经 ImGui::Image 呈现(零色偏),backbuffer 仅承载 ImGui;Direct/Viewport 双显示模式 + 面板分辨率上报 - 帧首同步 BeginFrameSync: resize/vsync/尺寸/模式意图统一帧首落定(修描述符悬垂);修复 vsync 意图未落 swapchain 导致的每帧重建交换链 - 输入: Editor 每帧判定键盘/鼠标归属(打字让位、Viewport hover/focus 放行、Fullscreen 全放行) - 材质: roughness 独立槽位 + 非 glTF 金属/粗糙贴图映射;透明队列 depthWrite=FALSE + translucent 独立 shader + scratch 清帧 - FBX: 非蒙皮网格烘焙节点链全局变换(Z-up 旋转/单位换算落顶点) - Hierarchy 行 ImGui ID 以 UUID 作用域(重名不冲突、改名不丢选中)
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <Engine/Core/Log.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <ranges>
|
||||
#include <set>
|
||||
#include <stdexcept>
|
||||
|
||||
@@ -41,8 +42,8 @@ namespace Engine::RG {
|
||||
ReleasePhysical();
|
||||
|
||||
const auto& vkDevice = m_Device.GetDevice();
|
||||
for (auto& [key, images] : m_Pool) {
|
||||
for (auto& img : images) {
|
||||
for (auto &images: m_Pool | std::views::values) {
|
||||
for (const auto& img : images) {
|
||||
if (!img->valid) continue;
|
||||
vkDevice.destroyImageView(img->view);
|
||||
m_Allocator.Destroy(img->allocation); // image 资源与显存成对释放
|
||||
@@ -57,7 +58,7 @@ namespace Engine::RG {
|
||||
{
|
||||
CheckMutable();
|
||||
|
||||
TextureHandle h{static_cast<u32>(m_Textures.size()), 1};
|
||||
const TextureHandle h{static_cast<u32>(m_Textures.size()), 1};
|
||||
|
||||
TextureEntry entry;
|
||||
entry.name = std::move(name);
|
||||
@@ -101,6 +102,15 @@ namespace Engine::RG {
|
||||
entry.importedView = view;
|
||||
}
|
||||
|
||||
void RenderGraph::SetImportedExtent(TextureHandle h, vk::Extent2D extent)
|
||||
{
|
||||
auto& entry = GetEntry(h);
|
||||
if (!entry.imported) {
|
||||
ENGINE_FATAL("RenderGraph: SetImportedExtent on non-imported resource '{}'", entry.name);
|
||||
}
|
||||
entry.importedExtent = extent;
|
||||
}
|
||||
|
||||
// ---------- Pass 声明 ----------
|
||||
|
||||
RenderGraph::PassBuilder RenderGraph::AddPass(std::string name, ExecuteFn exec)
|
||||
@@ -832,6 +842,13 @@ namespace Engine::RG {
|
||||
return entry.physical[frame.frameSlot]->image;
|
||||
}
|
||||
|
||||
vk::Extent2D RenderGraphContext::Extent(TextureHandle h) const
|
||||
{
|
||||
const auto& entry = graph->GetEntry(h);
|
||||
if (entry.imported) return entry.importedExtent;
|
||||
return entry.physical[frame.frameSlot]->extent;
|
||||
}
|
||||
|
||||
u32 RenderGraphContext::HistorySlot(u32 frameSlot) const
|
||||
{
|
||||
return graph->HistorySlot(frameSlot);
|
||||
|
||||
Reference in New Issue
Block a user