SetCurrentContext() private method

private SetCurrentContext ( IntPtr ctx ) : int
ctx System.IntPtr
return int
Ejemplo n.º 1
0
        public void Update()
        {
                        #if !RPI
            var frame = application.FrameSize;
            if (frame.Width != 0 && frame.Height != 0)
            {
                BackBufferSize = frame;
            }
                        #endif

                        #if WIN32
            WGL.MakeCurrent(dc, ctx);
                        #endif

                        #if RPI
            EGL.MakeCurrent(dc, surface, surface, ctx);
                        #elif LINUX
            GLX.MakeCurrent(dc, handle, ctx);
                        #endif

                        #if OSX
            CGL.SetCurrentContext(ctx);
                        #endif

                        #if NaCl
            PPAPI.SetCurrentContextPPAPI(context);
                        #endif

                        #if DEBUG
                        #if RPI
            checkForEGLError();
                        #endif
            checkForError();
                        #endif
        }
Ejemplo n.º 2
0
        public void DisableContext()
        {
                        #if WIN32
            WGL.MakeCurrent(dc, IntPtr.Zero);
                        #endif

                        #if RPI
            EGL.MakeCurrent(dc, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
                        #elif LINUX
            GLX.MakeCurrent(dc, IntPtr.Zero, IntPtr.Zero);
                        #endif

                        #if OSX
            CGL.SetCurrentContext(IntPtr.Zero);
                        #endif
        }