Hi, I think this is an easy question, sorry I am not really familiar with C++. I am using D3DImage in C++.Net project which is using it's SetBackBuffer method, and I am also using DX Surface. I don't know how to convert IDirect3DSurface9 to IntPtr as parameter in SetBackBuffer method. Anyone knows? please help.
A:
If you are using C++ with the IDirect3DSurface9, the surface is a pointer. For example:
IDirect3DSurface9 * pSurface;
/* ... */
IntPtr backBuffer = IntPtr(pSurface);
I would also suggest using SlimDX as it is a thin .NET layer on top of D3D.
Jeremiah Morrill
2010-08-08 05:08:24
Thank you for the answer, I've never tried managed and unmanaged C++ together.. it is really that simple (geez). also about the SlimDX I'll consider using it in this project cause I still don't know about the performance yet. Thank you.
Dave
2010-08-09 08:28:05