From d89331f1636f8d53a3c8e9d0f7bfcf7a6041b88a Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Thu, 4 Dec 2025 18:50:48 -0800 Subject: Tidy --- dxg/src/imm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'dxg/src/imm.c') diff --git a/dxg/src/imm.c b/dxg/src/imm.c index 28baa99..4a4be93 100644 --- a/dxg/src/imm.c +++ b/dxg/src/imm.c @@ -18,9 +18,6 @@ ping-ponging between the two buffers.*/ #include // generated #include // generated -#define WIN32_LEAN_AND_MEAN -#include // OutputDebugStringA - #include #include @@ -181,7 +178,7 @@ static void dxg_imm_draw(DxgImm* imm) { pCmdQueue->lpVtbl->ExecuteCommandLists(pCmdQueue, 1, cmdLists); } -DxgImm* dxg_imm_init(ID3D12Device* pDevice, ID3D12CommandQueue* pCmdQueue, DXGI_FORMAT swapChainRtvFormat, DXGI_SAMPLE_DESC swapChainSampleDesc, size_t bufferSizeVerts) { +DxgImm* dxg_imm_init(ID3D12Device* pDevice, ID3D12CommandQueue* pCmdQueue, DXGI_FORMAT swapChainRtvFormat, DXGI_SAMPLE_DESC swapChainSampleDesc, size_t bufferSize) { assert(pDevice); assert(pCmdQueue); @@ -192,7 +189,7 @@ DxgImm* dxg_imm_init(ID3D12Device* pDevice, ID3D12CommandQueue* pCmdQueue, DXGI_ imm->pDevice = pDevice; imm->pCmdQueue = pCmdQueue; - imm->bufferSizeVerts = bufferSizeVerts; + imm->bufferSizeVerts = bufferSize / 3 / sizeof(float); imm->fenceValue = 0; // TODO: Move this to the application side. @@ -271,7 +268,6 @@ DxgImm* dxg_imm_init(ID3D12Device* pDevice, ID3D12CommandQueue* pCmdQueue, DXGI_ TrapIfFailed(imm->pDevice->lpVtbl->CreateGraphicsPipelineState( imm->pDevice, &gpso, &IID_ID3D12PipelineState, &imm->pPipelineState)); - const size_t bufferSize = verts_byte_count(bufferSizeVerts); for (int i = 0; i < 2; ++i) { imm->resources[i].pVertexBuffer = create_buffer(pDevice, bufferSize); if (!imm->resources[i].pVertexBuffer) { -- cgit v1.2.3