Sign in to follow this  
Headkaze

[SlimDX] Fastest memory to texture method

Recommended Posts

Headkaze    607
I am porting my engine from MDX to SlimDX and there are several times when I need to copy data from RAM into a texture's surface quickly (like for video). There was no fast way to do this in MDX so I used the following custom API call.

[code][DllImport("d3dx9_30.dll")]
private static extern int D3DXLoadSurfaceFromMemory(IntPtr pDestSurface, IntPtr pDestPalette, ref RECT pDestRect, IntPtr pSrcMemory, D3dFormat SrcFormat, uint SrcPitch, IntPtr pSrcPalette, ref RECT pSrcRect, D3dxFilter Filter, int ColorKey);[/code]

I am curious if this method is already defined in SlimDX or if there any faster methods recommended? Also what is the exact dll version of DirectX 9 used in SlimDX incase I ever need to p/invoke it manually?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this