Exemple #1
0
        /// <summary>
        /// Pop all previous OpenGL States.
        /// </summary>
        public void PopGLStates()
        {
#if DEBUG
            var error = GLChecker.GetError();
            if (error != ErrorCode.NoError)
            {
                Logger.Warning("OpenGL Error ({1}) has detected in user code.\n" +
                               "Make sure to check the error when using custom OpenGL codes.", error);
            }
#endif
            GL.MatrixMode(MatrixMode.Modelview);
            GL.PopMatrix();
            GL.MatrixMode(MatrixMode.Projection);
            GL.PopMatrix();
            GL.MatrixMode(MatrixMode.Texture);
            GL.PopMatrix();

            // Reset GL States
            Reset();
        }