CreateDevice() protected method

protected CreateDevice ( IntPtr windowHandle, int width, int height ) : void
windowHandle System.IntPtr
width int
height int
return void
Example #1
0
        public static GraphicsDeviceService AddRef(IntPtr windowHandle, int width, int height)
        {
            if (Interlocked.Increment(ref _refCount) == 1)
            {
                _instance.CreateDevice(windowHandle, width, height);
            }

            return(_instance);
        }
        public static GraphicsDeviceService AddRef(IntPtr windowHandle, int width, int height)
        {
            if (Interlocked.Increment(ref _refCount) == 1) {
                _instance = new GraphicsDeviceService();
                _instance.CreateDevice(windowHandle, width, height);
            }

            return _instance;
        }