Jump to content
  • Advertisement

DX12 How to render in Dx12 without a vertex buffer

Recommended Posts

I found this for DX11: https://msdn.microsoft.com/en-us/library/windows/desktop/bb232912

I am not sure how to use this with Dx12. It doesn't complain about the HLSL and I use:
m_commandList->IASetVertexBuffers(0, 0, nullptr);

and it compiles and runs, but still can't see my triangle.

Rest of the code shown in the link I don't know how to use it for Dx12.

Edited by NikiTo

Share this post

Link to post
Share on other sites

The biggest issue here is your referencing D3D11 materials, and trying to apply that to 12. These APIs may have similar looking methods, but they couldn't be any further apart in the pipeline configuration. I only know a little about 12, but I'm pretty sure there wouldn't be an easy way to integrate the deprecated effects framework with it, not at least without getting very creative.

The shader itself may accomplish pushing the vertices/texels to the rasterizer, but that still doesn't address the multiple issues you may have on the app side. Especially with 12...Are you syncing correctly? Are you handling your command Allocators, and Queue appropriately? How's does the PSO look? Even in D3D11 you had a lot of points of failure. D3D12 is even worse.

I'm gonna parrot your previous thread and say use PIX at the very least. Or, if nothing at all. At least use the built in Visual Studio Graphics Debugger so you can ascertain which stage may not be running.

Share this post

Link to post
Share on other sites

Load it up in renderdoc and you'll be able to see your triangle as a table of numbers that were produced by the vertex shader.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!