-
Notifications
You must be signed in to change notification settings - Fork 0
Class Diagram
nishihi6 edited this page Sep 28, 2023
·
1 revision
classDiagram
class WinMain["WinMain()関数"]
note for WinMain "main()関数は無く、\nWinMain()関数から\nプログラムが開始される"
WinMain .. Application
class Application
Application : +Execute()
Application : +Instance()
Application : -Window m_window
Application : -Application()
class WindowProcedure["WindowProcedure()関数"]
note for WindowProcedure "アプリケーションに送られてくる\nメッセージを処理する"
WindowProcedure .. Window
class Window
Window : +GetWndHandle()
Window : +Create()
Window : +ProcessMessage()
Window : -HWND m_hWnd
Window <-- Application
class ID3D12Device8
<<interface>> ID3D12Device8
note for ID3D12Device8 "リソースの作成・管理\nコマンドリストの作成\nパイプラインステートの作成\n(GPU情報の)クエリの作成"
ID3D12Device8 <-- GraphicsDevice
class IDXGIFactory6
<<interface>> IDXGIFactory6
note for IDXGIFactory6 "アダプターの列挙\nスワップチェーンの作成\nフルスクリーンの管理\n出力ウィンドウの管理"
IDXGIFactory6 <-- GraphicsDevice
class IDXGISwapChain4
<<interface>> IDXGISwapChain4
note for IDXGISwapChain4 "バッファの管理\nバッファのスワップ\nバッファのサイズ変更\n"
IDXGISwapChain4 <-- GraphicsDevice
class ID3D12CommandAllocator
<<interface>> ID3D12CommandAllocator
note for ID3D12CommandAllocator "コマンドリストに必要なメモリ\nを割り当てる"
ID3D12CommandAllocator <-- GraphicsDevice
class ID3D12GraphicsCommandList6
<<interface>> ID3D12GraphicsCommandList6
note for ID3D12GraphicsCommandList6 "コマンドリストをカプセル化\nしてコマンドを記述する"
ID3D12GraphicsCommandList6 <-- GraphicsDevice
class ID3D12CommandQueue
<<interface>> ID3D12CommandQueue
note for ID3D12CommandQueue "コマンドリストをGPUに\n送信する"
ID3D12CommandQueue <-- GraphicsDevice
class ID3D12Resource
<<interface>> ID3D12Resource
note for ID3D12Resource "CPUとGPUの機能をカプセル化し、\nメモリ or ヒープの読み書きを行う"
ID3D12Resource <-- GraphicsDevice
class ID3D12Fence
<<interface>> ID3D12Fence
note for ID3D12Fence "CPUとGPUの同期を行う"
ID3D12Fence <-- GraphicsDevice
class ID3D12CommandList
<<interface>> ID3D12CommandList
note for ID3D12CommandList "GPUが実行するコマンドの\n順序付きセットを表す"
ID3D12CommandList <-- GraphicsDevice
class GraphicsDevice
GraphicsDevice : +Init()
GraphicsDevice : +Prepare()
GraphicsDevice : +ScreenFlip()
GraphicsDevice : +WaitForCommandQueue()
GraphicsDevice : +GetDevice()
GraphicsDevice : +GetCmdList()
GraphicsDevice : +Instance()
GraphicsDevice : -CreateFactory()
GraphicsDevice : -CreateDevice()
GraphicsDevice : -CreateCommandList()
GraphicsDevice : -CreateSwapchain()
GraphicsDevice : -CreateSwapchainRTV()
GraphicsDevice : -CreateFence()
GraphicsDevice : -SetResourceBarrier()
GraphicsDevice : -enum class GPUTier{}
GraphicsDevice : -ComPtr~ID3D12Device8~ m_pDevice
GraphicsDevice : -ComPtr~ID3D12Factory6~ m_pDxgiFactory
GraphicsDevice : -ComPtr~ID3D12CommandAllocator~ m_pCmdAllocator
GraphicsDevice : -ComPtr~ID3D12GraphicsCommandList6~ m_pCmdList
GraphicsDevice : -ComPtr~ID3D12CommandQueue~ m_pCmdQueue
GraphicsDevice : -ComPtr~ID3D12SwapChain4~ m_pSwapChain
GraphicsDevice : -array2~ComPtr~ID3D12Resource~~ m_pSwapchainBuffers
GraphicsDevice : -unique_ptr~RTVHeap~ m_pRTVHeap
GraphicsDevice : -ComPtr~ID3D12Fence~ m_pFence
GraphicsDevice : -UINT64 m_fenceVal
GraphicsDevice : -GraphicsDevice()
GraphicsDevice : -~GraphicsDevice()
GraphicsDevice <-- Application
class ID3D12Device
<<interface>> ID3D12Device
note for ID3D12Device "リソースの作成・管理\nコマンドリストの作成\nパイプラインステートの作成\n(GPU情報の)クエリの作成"
ID3D12Device <-- RTVHeap
class ID3D12DescriptorHeap
<<interface>> ID3D12DescriptorHeap
note for ID3D12DescriptorHeap "リソースとビューを管理して\nレンダリングパイプラインを\n設定する"
ID3D12DescriptorHeap <-- RTVHeap
class RTVHeap
RTVHeap : +Create()
RTVHeap : +CreateRTV()
RTVHeap : +GetRTVCPUHandle()
RTVHeap : -ID3D12Device* m_pDevice
RTVHeap : -ComPtr~ID3D12DescriptorHeap~ m_pHeap
RTVHeap : -int m_useCount
RTVHeap : -int m_incrementSize
RTVHeap : -int m_nextRegistNumber
RTVHeap <-- GraphicsDevice
class Mesh
Mesh : +Create()
Mesh : +DrawInstanced()
Mesh : -GraphicsDevice* m_pDevice
Mesh : -ComPtr~ID3D12Resource~ m_pVBuffer
Mesh : -ComPtr~ID3D12Resource~ m_pIBuffer
Mesh : -D3D12_VERTEX_BUFFER_VIEW m_vbView
Mesh : -D3D12_INDEX_BUFFER_VIEW m_ibView
Mesh : -array3~Vector3~ m_vertices
GraphicsDevice <-- Mesh
ID3D12Resource <-- Mesh
class ID3D12RootSignature
<<interface>> ID3D12RootSignature
note for ID3D12RootSignature "リソースとシェーダーを\n対応付ける"
ID3D12RootSignature <-- RootSignature
class ID3DBlob
<<interface>> ID3DBlob
note for ID3DBlob "リソースとシェーダーを\n対応付ける"
ID3DBlob <-- RootSignature
class RootSignature
RootSignature : +Create()
RootSignature : +GetRootSignature()
RootSignature : -CreateRange()
RootSignature : -CreateStaticSampler()
RootSignature : -GraphicsDevice* m_pDevice
RootSignature : -ComPtr~ID3DBlob~ m_pRootBlob
RootSignature : -ComPtr~ID3D12RootSignature~ m_pRootSignature
GraphicsDevice <-- RootSignature
class ID3D12PipelineState
<<interface>> ID3D12PipelineState
note for ID3D12PipelineState "すべてのシェーダーの\n状態を表す"
ID3D12PipelineState <-- Pipeline
class Pipeline
Pipeline : +SetRenderSettings()
Pipeline : +Create()
Pipeline : +GetPipeline()
Pipeline : +GetTopologyType()
Pipeline : -SetInputLayout()
Pipeline : -SetBlendMode()
Pipeline : -GraphicsDevice* m_pDevice
Pipeline : -RootSignature* m_pRootSignature
Pipeline : -vector~InputLayout~ m_inputLayouts
Pipeline : -CullMode m_cullMode
Pipeline : -BlendMode m_blendMode
Pipeline : -PrimitiveTopologyType m_topologyType
Pipeline : -ComPtr~ID3D12PipelineState~ m_pPipelineState
GraphicsDevice <-- Pipeline
RootSignature <-- Pipeline
class Shader
Shader : +Create()
Shader : +Begin()
Shader : +DrawMesh()
Shader : -LoadShaderFile()
Shader : -GraphicsDevice* m_pDevice
Shader : -unique_ptr~Pipeline~ m_upPipeline
Shader : -unique_ptr~RootSignature~ m_upRootSignature
Shader : -ID3DBlob* m_pVSBlob
Shader : -ID3DBlob* m_pHSBlob
Shader : -ID3DBlob* m_pDSBlob
Shader : -ID3DBlob* m_pGSBlob
Shader : -ID3DBlob* m_pPSBlob
GraphicsDevice <-- Shader
Pipeline <-- Shader
RootSignature <-- Shader
ID3DBlob <-- Shader