示例#1
0
 private void ApplyRasterizationMode(RasterizationMode rasterizationMode)
 {
     if (_renderState.RasterizationMode != rasterizationMode)
     {
         GL.PolygonMode(MaterialFace.FrontAndBack, TypeConverterGL3x.To(rasterizationMode));
         _renderState.RasterizationMode = rasterizationMode;
     }
 }
        public static PolygonMode To(RasterizationMode mode)
        {
            switch (mode)
            {
                case RasterizationMode.Point:
                    return PolygonMode.Point;
                case RasterizationMode.Line:
                    return PolygonMode.Line;
                case RasterizationMode.Fill:
                    return PolygonMode.Fill;
            }

            throw new ArgumentException("mode");
        }