• Advertisement
Sign in to follow this  

[SlimDX] Fastest memory to texture method

This topic is 2443 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

[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);


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
Advertisement
All the Surface.FromMemory methods require a byte array as a source. I need the source to be an IntPtr.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement