DLL でマネージド DirectX 9 デバイスを作成し、その DLL を使用してシーンをオフスクリーン サーフェスにレンダリングしようとしています。オフスクリーン レンダリングの方法は知っていますが、私の質問は次のとおりです。
DLL 内で directx デバイスを作成することは可能ですか?
弱い試み #1 ( InvalidCallException
):
Device device = new Device(0, DeviceType.Hardware, null, CreateFlags.SoftwareVertexProcessing, presentParams);
弱い試み #2 ( InvalidCallException
):
Device device = new Device(0, DeviceType.Hardware, new IntPtr(0), CreateFlags.SoftwareVertexProcessing, presentParams);
使用可能なデバイス コンストラクターのオーバーロードは次のとおりです。
public Device(int, DeviceType, Control, CreateFlags, PresentParameters[]);
public Device(int, DeviceType, IntPtr, CreateFlags, PresentParameters[]);
助けがあれば、私の一日がうまくいく可能性があります!