refactor(editor): Complete architecture refactoring
- SceneManager: remove singleton, use dependency injection via EditorContext - SelectionManager: already interface-based via ISelectionManager - Panel: now receives IEditorContext for accessing managers - HierarchyPanel: migrated to use IEditorContext instead of singletons - Add ISceneManager interface and SceneManagerImpl - EditorContextImpl: holds all editor subsystems Architecture now follows dependency injection pattern: Application -> EditorContext -> SceneManager/SelectionManager EditorLayer -> Panels (receive context via SetContext) All Manager singletons removed: EditorSceneManager::Get(), SelectionManager::Get()
This commit is contained in:
@@ -276,9 +276,24 @@ void D3D12CommandList::AliasBarrierInternal(ID3D12Resource* beforeResource, ID3D
|
||||
|
||||
void D3D12CommandList::BeginRenderPass(RHIRenderPass* renderPass, RHIFramebuffer* framebuffer,
|
||||
const Rect& renderArea, uint32_t clearValueCount, const ClearValue* clearValues) {
|
||||
(void)renderArea;
|
||||
if (!framebuffer || !renderPass) return;
|
||||
|
||||
D3D12_VIEWPORT d3dViewport = {};
|
||||
d3dViewport.TopLeftX = static_cast<float>(renderArea.left);
|
||||
d3dViewport.TopLeftY = static_cast<float>(renderArea.top);
|
||||
d3dViewport.Width = static_cast<float>(renderArea.right - renderArea.left);
|
||||
d3dViewport.Height = static_cast<float>(renderArea.bottom - renderArea.top);
|
||||
d3dViewport.MinDepth = 0.0f;
|
||||
d3dViewport.MaxDepth = 1.0f;
|
||||
m_commandList->RSSetViewports(1, &d3dViewport);
|
||||
|
||||
D3D12_RECT d3dScissor = {};
|
||||
d3dScissor.left = renderArea.left;
|
||||
d3dScissor.top = renderArea.top;
|
||||
d3dScissor.right = renderArea.right;
|
||||
d3dScissor.bottom = renderArea.bottom;
|
||||
m_commandList->RSSetScissorRects(1, &d3dScissor);
|
||||
|
||||
D3D12Framebuffer* d3d12Framebuffer = static_cast<D3D12Framebuffer*>(framebuffer);
|
||||
|
||||
uint32_t rtCount = d3d12Framebuffer->GetRenderTargetCount();
|
||||
|
||||
@@ -489,6 +489,8 @@ void OpenGLCommandList::BeginRenderPass(RHIRenderPass* renderPass, RHIFramebuffe
|
||||
OpenGLFramebuffer* glFramebuffer = static_cast<OpenGLFramebuffer*>(framebuffer);
|
||||
glFramebuffer->Bind();
|
||||
|
||||
if (!renderPass) return;
|
||||
|
||||
OpenGLRenderPass* glRenderPass = static_cast<OpenGLRenderPass*>(renderPass);
|
||||
if (glRenderPass) {
|
||||
const AttachmentDesc* colorAttachments = glRenderPass->GetColorAttachments();
|
||||
|
||||
Reference in New Issue
Block a user