Original Post
Hi, Im trying to initilize Direct3D in C# and was getting someerrors which I couldnt figure out what was causing them All the errors are with this method
public void InitDevice()
{
Device device;
PresentParameters presentParams = new PresentParameters();
presentParams.Windowed = true;
presentParams.SwapEffect = SwapEffect.Discard;
device = new Device(0, DeviceType.Hardware, this,
CreateFlags.SoftwareVertexProcessing, presentParams);
}
The best overloaded method match for 'Microsoft.DirectX.Direct3D.Device.Device(int, Microsoft.DirectX.Direct3D.DeviceType, System.IntPtr, Microsoft.DirectX.Direct3D.CreateFlags, params Microsoft.DirectX.Direct3D.PresentParameters[])' has some invalid arguments C:\Documents and Settings\Kevin\Desktop\WindowsApplication1\WindowsApplication1\Program.cs 17 Argument '5': cannot convert from 'Microsoft.DirectX.Direct3D.PresentParameters' to 'Microsoft.DirectX.Direct3D.PresentParameters[]' C:\Documents and Settings\Kevin\Desktop\WindowsApplication1\WindowsApplication1\Program.cs 18 Argument '3': cannot convert from 'WindowsApplication1.Program' to 'System.IntPtr' C:\Documents and Settings\Kevin\Desktop\WindowsApplication1\WindowsApplication1\Program.cs 17