Skip to content

Instantly share code, notes, and snippets.

@yorung
Created July 9, 2016 10:42
Show Gist options
  • Save yorung/c45f9d7df8ad6d9241b3692656a9a261 to your computer and use it in GitHub Desktop.
Save yorung/c45f9d7df8ad6d9241b3692656a9a261 to your computer and use it in GitHub Desktop.
[DX12] Usage of dynamic GPU memory allocator
afSetPipeline(pipelineState, rootSignature);
Mat invVP = inv(matV * matP);
int descriptorHeapIndex = deviceMan.AssignDescriptorHeap(2);
deviceMan.AssignConstantBuffer(descriptorHeapIndex, &invVP, sizeof(invVP));
deviceMan.AssignSRV(descriptorHeapIndex + 1, texId);
deviceMan.SetAssignedDescriptorHeap(descriptorHeapIndex);
afDraw(PT_TRIANGLESTRIP, 4);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment