Newbie Question

Started by
0 comments, last by nobodynews 13 years, 1 month ago
Hi Guys
I am quite new to directX and I am currently working through some bits and came across an example in DX9 that I wanted to use in my program, it uses the IDirect3DTexture9's LockRect function and I was wondering if there is a way to do this for a ID3D10Texture2D in DX10 or if there is something I am missing?
Thanks for your time
Ben
Advertisement

Hi Guys
I am quite new to directX and I am currently working through some bits and came across an example in DX9 that I wanted to use in my program, it uses the IDirect3DTexture9's LockRect function and I was wondering if there is a way to do this for a ID3D10Texture2D in DX10 or if there is something I am missing?
Thanks for your time
Ben


This isn't a perfect 1-to-1 equivalent thing, but you can do something similar to acquire the texture data by calling Map: http://msdn.microsoft.com/en-us/library/bb173867%28v=vs.85%29.aspx
This has an out parameter containing the data: http://msdn.microsoft.com/en-us/library/bb205319%28v=vs.85%29.aspx
The second link has an example of how to acquire and manipulate the data. Hope this helps.

C++: A Dialog | C++0x Features: Part1 (lambdas, auto, static_assert) , Part 2 (rvalue references) , Part 3 (decltype) | Write Games | Fix Your Timestep!

This topic is closed to new replies.

Advertisement