Beispiel #1
0
        public static void Cull(CullMode cullMode)
        {
            if (_cull != cullMode)
            {
                switch (cullMode)
                {
                case CullMode.CullClockwiseFace:
                    GL11.FrontFace(All11.Ccw);
                    GL11.CullFace(All11.Back);
                    GL11.Enable(All11.CullFace);
                    break;

                case CullMode.CullCounterClockwiseFace:
                    GL11.FrontFace(All11.Cw);
                    GL11.CullFace(All11.Back);
                    GL11.Enable(All11.CullFace);
                    break;

                case CullMode.None:
                    GL11.Disable(All11.CullFace);
                    break;
                }
                _cull = cullMode;
            }
        }