aglSetFullScreen() 정적인 개인적인 메소드

static private aglSetFullScreen ( AGLContext ctx, int width, int height, int freq, int device ) : void
ctx AGLContext
width int
height int
freq int
device int
리턴 void
예제 #1
0
        internal void SetFullScreen(CarbonWindowInfo info, out int width, out int height)
        {
            CarbonGLNative wind = GetCarbonWindow(info);

            Debug.Print("Switching to full screen {0}x{1} on context {2}",
                        wind.TargetDisplayDevice.Width, wind.TargetDisplayDevice.Height, Handle.Handle);

            CG.DisplayCapture(GetQuartzDevice(info));
            Agl.aglSetFullScreen(Handle.Handle, wind.TargetDisplayDevice.Width, wind.TargetDisplayDevice.Height, 0, 0);
            MakeCurrent(info);

            width  = wind.TargetDisplayDevice.Width;
            height = wind.TargetDisplayDevice.Height;

            // This is a weird hack to workaround a bug where the first time a context
            // is made fullscreen, we just end up with a blank screen.  So we undo it as fullscreen
            // and redo it as fullscreen.
            if (firstFullScreen == false)
            {
                firstFullScreen = true;
                UnsetFullScreen(info);
                SetFullScreen(info, out width, out height);
            }

            mIsFullscreen = true;
        }
예제 #2
0
        internal void SetFullScreen(CarbonWindow wind, out int width, out int height)
        {
            int displayWidth  = wind.Display.Bounds.Width;
            int displayHeight = wind.Display.Bounds.Height;

            Debug.Print("Switching to full screen {0}x{1} on context {2}",
                        displayWidth, displayHeight, ContextHandle);

            CG.CGDisplayCapture(CG.CGMainDisplayID());
            byte code = Agl.aglSetFullScreen(ContextHandle, displayWidth, displayHeight, 0, 0);

            Agl.CheckReturnValue(code, "aglSetFullScreen");
            MakeCurrent(wind);

            width  = displayWidth;
            height = displayHeight;

            // This is a weird hack to workaround a bug where the first time a context
            // is made fullscreen, we just end up with a blank screen.  So we undo it as fullscreen
            // and redo it as fullscreen.
            if (!firstFullScreen)
            {
                firstFullScreen = true;
                UnsetFullScreen(wind);
                SetFullScreen(wind, out width, out height);
            }
            mIsFullscreen = true;
        }
예제 #3
0
        internal void SetFullScreen(CarbonWindowInfo info)
        {
            Agl.aglSetFullScreen(Handle.Handle, 0, 0, 0, 0);

            // This is a weird hack to workaround a bug where the first time a context
            // is made fullscreen, we just end up with a blank screen.  So we undo it as fullscreen
            // and redo it as fullscreen.
            if (firstFullScreen == false)
            {
                firstFullScreen = true;
                UnsetFullScreen(info);
                SetFullScreen(info);
            }
        }
예제 #4
0
        internal void SetFullScreen(CarbonWindowInfo info, out int width, out int height)
        {
            CarbonGLNative carbonWindow = this.GetCarbonWindow(info);
            int            num          = (int)CG.DisplayCapture(this.GetQuartzDevice(info));

            Agl.aglSetFullScreen(this.Handle.Handle, carbonWindow.TargetDisplayDevice.Width, carbonWindow.TargetDisplayDevice.Height, 0, 0);
            this.MakeCurrent((IWindowInfo)info);
            width  = carbonWindow.TargetDisplayDevice.Width;
            height = carbonWindow.TargetDisplayDevice.Height;
            if (!this.firstFullScreen)
            {
                this.firstFullScreen = true;
                this.UnsetFullScreen(info);
                this.SetFullScreen(info, out width, out height);
            }
            this.mIsFullscreen = true;
        }