/** * Jingga * * @copyright Jingga * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ #ifndef TOS_GPUAPI_DIRECTX_GPU_API_CONTAINER_H #define TOS_GPUAPI_DIRECTX_GPU_API_CONTAINER_H #include "../../stdlib/Types.h" #include "../../../EngineDependencies/directx/d3d12.h" #include "../../../EngineDependencies/directx/d3dx12.h" #include #include #include #include #include struct GpuApiContainer { uint32 frames_in_flight; uint32 framebuffer_idx; Microsoft::WRL::ComPtr device; Microsoft::WRL::ComPtr swapchain; Microsoft::WRL::ComPtr command_queue; Microsoft::WRL::ComPtr rtv_heap; uint32 rtv_info_size; // @todo should be dynamic size based on frames_in_flight, no? Microsoft::WRL::ComPtr render_targets[2]; Microsoft::WRL::ComPtr command_allocator; Microsoft::WRL::ComPtr command_list; Microsoft::WRL::ComPtr pipeline_state; Microsoft::WRL::ComPtr root_signature; Microsoft::WRL::ComPtr fence; UINT64 fence_value = 0; HANDLE fence_event; // ???? CD3DX12_VIEWPORT m_viewport; CD3DX12_RECT m_scissorRect; // @todo This definately doesn't belong here Microsoft::WRL::ComPtr m_vertexBuffer; D3D12_VERTEX_BUFFER_VIEW m_vertexBufferView; }; #endif