예제 #1
0
        public void Dispose()
        {
            try
            {
                if (needUnbindContext)
                {
                    GL.Flush();

#if STRIDE_PLATFORM_IOS
                    if (previousContext != null)
                    {
                        OpenGLES.EAGLContext.SetCurrentContext(previousContext);
                    }
#else
                    // Restore graphics context
                    GraphicsDevice.UnbindGraphicsContext(deviceCreationContext);
#endif
                }
            }
            finally
            {
                // Unlock
                if (asyncCreationLockTaken)
                {
#if STRIDE_PLATFORM_ANDROID
                    if (tegraWorkaround)
                    {
                        // Notify GraphicsDevice.ExecutePendingTasks() that we are done.
                        Monitor.Pulse(asyncCreationLockObject);
                    }
#endif
                    Monitor.Exit(asyncCreationLockObject);
                }
            }
        }
예제 #2
0
        public void Dispose()
        {
            try
            {
                if (needUnbindContext)
                {
                    GL.Flush();

                    // Restore graphics context
                    GraphicsDevice.UnbindGraphicsContext(deviceCreationContext);
                }
            }
            finally
            {
                // Unlock
                if (asyncCreationLockTaken)
                {
                    Monitor.Exit(asyncCreationLockObject);
                }
            }
        }