Jump to content

  • Log In with Google      Sign In   
  • Create Account


jsedlak

Member Since 19 Jan 2012
Offline Last Active Jan 23 2012 04:19 AM

Posts I've Made

In Topic: Questions about Map/UpdateSubResource

21 January 2012 - 10:37 AM



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.


How do you map a subresource into a position in an array of another?

Sorry, I don't understand the question - do you mean mapping a texture subresource to another texture array subresource? If so, then for mapping you just map the two subresources and then copy the data directly. With UpdateSubResource you more or less specify the locations in the parameter arguments and the function does the copying for you.


I'm probably not asking the right question... (and yes, sorry for the hijack)
http://www.gamedev.net/topic/618817-using-texture2darray-and-shaderresourceview/

In Topic: Questions about Map/UpdateSubResource

20 January 2012 - 09:40 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.


How do you map a subresource into a position in an array of another?

In Topic: Using Texture2DArray and ShaderResourceView?

20 January 2012 - 03:49 AM

I updated the code - something with how I am trying to copy the textures is not working...

var box = App.Device.ImmediateContext.MapSubresource(stagingTexture, 0, i, MapMode.Write, MapFlags.None);
App.Device.ImmediateContext.UpdateSubresource(box, tileset.Texture, 0);
App.Device.ImmediateContext.UnmapSubresource(stagingTexture, 0);

PARTNERS