#pragma once #include #include #include #include #include "Theme.h" #include "panels/Panel.h" #include "panels/MenuBar.h" #include "panels/HierarchyPanel.h" #include "panels/SceneViewPanel.h" #include "panels/GameViewPanel.h" #include "panels/InspectorPanel.h" #include "panels/ConsolePanel.h" #include "panels/ProjectPanel.h" namespace UI { class Application { public: static Application& Get(); bool Initialize(HWND hwnd); void Shutdown(); void Render(); void OnResize(int width, int height); private: Application() = default; ~Application() = default; bool CreateDevice(); bool CreateRenderTarget(); void CleanupRenderTarget(); void SetupDockspace(); void RenderUI(); HWND m_hwnd = nullptr; int m_width = 1280; int m_height = 720; ID3D12Device* m_device = nullptr; ID3D12CommandQueue* m_commandQueue = nullptr; ID3D12CommandAllocator* m_commandAllocator = nullptr; ID3D12GraphicsCommandList* m_commandList = nullptr; IDXGISwapChain3* m_swapChain = nullptr; ID3D12DescriptorHeap* m_rtvHeap = nullptr; ID3D12DescriptorHeap* m_srvHeap = nullptr; ID3D12Resource* m_renderTargets[3] = {}; ID3D12Fence* m_fence = nullptr; UINT64 m_fenceValue = 0; UINT m_rtvDescriptorSize = 0; UINT m_frameIndex = 0; std::unique_ptr m_menuBar; std::unique_ptr m_hierarchyPanel; std::unique_ptr m_sceneViewPanel; std::unique_ptr m_gameViewPanel; std::unique_ptr m_inspectorPanel; std::unique_ptr m_consolePanel; std::unique_ptr m_projectPanel; }; }