Ejemplo n.º 1
0
        public static void DisablePrimitiveRestart(GraphicsContext ctx)
        {
            if (ctx == null)
            {
                throw new ArgumentNullException("ctx");
            }

            if (ctx.Caps.GlExtensions.PrimitiveRestart)
            {
                // Enable primitive restart (server state)
                Gl.Disable(EnableCap.PrimitiveRestart);
            }
            else if (ctx.Caps.GlExtensions.PrimitiveRestart_NV)
            {
                // Enable primitive restart (client state)
                Gl.DisableClientState(EnableCap.PrimitiveRestartNv);
            }
            else
            {
                throw new InvalidOperationException("primitive restart not supported");
            }
        }