Afterglow.Graphics.SlimDXRenderWindow.SlimDXRenderWindow C# (CSharp) Method

SlimDXRenderWindow() public method

Initializes a new instance of the SlimDXRenderWindow class.
public SlimDXRenderWindow ( IntPtr windowHandle ) : System
windowHandle System.IntPtr The window handle.
return System
        public SlimDXRenderWindow(IntPtr windowHandle)
        {
            mWindowHandle = windowHandle;

            try
            {
                // the debug mode requires the sdk to be installed otherwise an exception is thrown
                mDevice = new Device(DeviceCreationFlags.Debug);
            }
            catch (Direct3D10Exception)
            {
                mDevice = new Device(DeviceCreationFlags.None);
            }

            if (mIsWindowed)
            {
                mHeight = HEIGHT;
                mWidth = WIDTH;
            }
            else
            {
                mWidth = 1280;
                mHeight = 1024;
            }

            CreateSwapChainRenderTargetAndViewport();

            SetRasterizeStateDescription();
        }