SetROP2 is used with GDI, I do not think it mixes well with DirectX, to use SetROP2 in C#, you need to use Interop, for example:[sysimport(dll="gdi32.dll")]
public static extern int SetROP2(int h, int op);
...
Graphics g = CreateGraphics();
hdc = g.GetHDC();
SetROP2(hdc,7); // R2_XORPEN
g.ReleaseHDC(hdc);see
http://www.mail-archive.com/[email protected]/msg00024.htmlhttp://www.syncfusion.com/FAQ/WinForms/FAQ_c75c.asp#q634q
Currently, if you need to use DirectX in .NET, you need to use Interop, but DirectX 9 will have native C# support, for now, see
DirectX and .NET
http://sunlightd.virtualave.net/Windows/DirectX.NET/

解决方案 »

  1.   

    http://mays.soage.com/develop/effect/200109/ComposePIC.htm
    我没有做过DIRECTX,希望这URL对你有帮助。
      

  2.   

    我看过一段时间的DirectX8, 但是发现,C#对其必须的顶点缓冲,支持太差,现在根本无法实现。
    我想在目前9还没有出来的情况下,这个暂时放弃。
    目前,我也是放弃,因为工期太紧了。或者使用VC++.Net写类库,然后再由C#调用。再不成,用OpenGL吧。