How blits pixels to video memory directly with Direct3D11?

Started by
0 comments, last by kauna 10 years, 4 months ago

Hi, Im newbie in DirectX11 on Windows Phone as Windows Store App.

My recent project is simple porting of other 2D native software using SDL to .Net with DirectX.

Here is my question. How blits pixels data to video memory directly using Direct3D11 (without Direct2D, because Direct2D is not exists in Windows phone 8!). SDL provides surface structure which has directly writable buffer. But Direct3D has no way like SDL.

I think that using Dynamic Texture2D with Map and UnMap methods, but I can't sure this is best way.

I want to your opinions. Thanks.

Advertisement

Dynamic Texture with map and unmap should do the work. Only thing that you should keep in mind is that you shouldn't map/unmap for drawing individual pixels in the buffer.

You could keep another buffer in system memory and copy the whole buffer to the dynamic texture. This way you'll keep the mapping and unmapping at minimum.

Cheers!

This topic is closed to new replies.

Advertisement