public IrrlichtDevice(DriverType type, Dimension2D dim, int bits, bool fullscreen, bool stencil, bool vsync, bool antialias, IntPtr windowHandle) { Console.WriteLine("Irrlicht.NET CP v" + CPVersion + " running"); Initialize(CreateDeviceA(type, dim.ToUnmanaged(), bits, fullscreen, stencil, vsync, antialias, windowHandle)); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); MainNativeEvent = OnNativeEvent; Device_SetCallback(_raw, MainNativeEvent); }
static extern void Device_SetCallback(IntPtr device, NativeEvent callback);