refactor: rename ui_editor to editor for consistency
This commit is contained in:
65
editor/src/Application.h
Normal file
65
editor/src/Application.h
Normal file
@@ -0,0 +1,65 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <imgui.h>
|
||||
#include <d3d12.h>
|
||||
#include <dxgi1_6.h>
|
||||
|
||||
#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<MenuBar> m_menuBar;
|
||||
std::unique_ptr<HierarchyPanel> m_hierarchyPanel;
|
||||
std::unique_ptr<SceneViewPanel> m_sceneViewPanel;
|
||||
std::unique_ptr<GameViewPanel> m_gameViewPanel;
|
||||
std::unique_ptr<InspectorPanel> m_inspectorPanel;
|
||||
std::unique_ptr<ConsolePanel> m_consolePanel;
|
||||
std::unique_ptr<ProjectPanel> m_projectPanel;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user