Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#ActualBornToCode

Posted 31 May 2013 - 07:29 AM

The topic says it all. In DirectX 9 you can create a Vertex/Index buffer and then when you map it you give it an hint to tell it how you are going to access the buffer, easy to use. In DirectX 11 on the other hand we can no longer specify the map type unless CPUAccessResource is set to either Read,Write or Read/Write which is ok. But the problem comes from whenever you have a READ/WRITE resource the resource cannot be bind to anything. DX11 Provide different Access flags, but there is no flags that I can set where I can access the resource as a Read/Write on the CPU and at the same time have it bind to an vertex or index buffer. So how in DirectX11 are you supposed to create a buffer that you want to READ/Write from on the CPU side and be able to use that same buffer to render onto the screen. The buffer system in DirectX11 is definitely a step backward. If anyone has any idea, please let me know. Because right now the only way I can see to do that is to create an Staging resource and a Dynamic resource. Then copy staging resource data to the dynamic resource using an map. Doing that would force me to duplicate buffers, so I know there has to be a better way to do this.


#1BornToCode

Posted 31 May 2013 - 07:27 AM

The topic says it all. In DirectX 9 you can create a Vertex/Index buffer and then when you map it you give it an hint to tell it how you are going to access the buffer, easy to use. In DirectX 11 on the other hand we can longer specify the map type unless CPUAccessResource is set to either Read,Write or Read/Write which is ok. But the problem comes from whenever you have a READ/WRITE resource the resource cannot be bind to anything. DX11 Provide different Access flags, but there is no flags that I can set where I can access the resource as a Read/Write on the CPU and at the same time have it bind to an vertex or index buffer. So how in DirectX11 are you supposed to create a buffer that you want to read from on the CPU side and be able to use that same buffer to render onto the screen. The buffer system in DirectX11 is definitely a step backward. If anyone has any idea, please let me know. Because right now the only way I can see to do that is to create an Staging resource and a Dynamic resource. Then copy staging resource data to the dynamic resource using an map. Doing that would force me to duplicate buffers, so I know there has to be a better way to do this.


PARTNERS