Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#ActualTape_Worm

Posted 21 January 2012 - 02:19 PM

Map is used to map a complete subresource - for buffers that means the whole buffer, and for textures that can mean a lot of different things depending on the dimension, array size, and mip levels.  UpdateSubResource has the ability to update only a portion of a subresource, which can be an advantage in some cases.

I personally use Map to update my constant buffers in Hieroglyph3, but I think either method can be used...


So, you can update a portion of a vertex buffer with UpdateSubResource then?  I'm just wondering how I would pass the offset within the buffer and the number of bytes to update to the UpdateSubResource method?  Can you use UpdateSubResource to update a portion of a constant buffer?

#1Tape_Worm

Posted 21 January 2012 - 02:12 PM

Map is used to map a complete subresource - for buffers that means the whole buffer, and for textures that can mean a lot of different things depending on the dimension, array size, and mip levels.  UpdateSubResource has the ability to update only a portion of a subresource, which can be an advantage in some cases.

I personally use Map to update my constant buffers in Hieroglyph3, but I think either method can be used...


So, you can update a portion of a vertex buffer with UpdateSubResource then?  I'm just wondering how I would pass the offset within the buffer and the number of bytes to update to the UpdateSubResource method?

PARTNERS