Пример #1
0
        public RasterizerDesc1
        (
            FillMode?fillMode          = null,
            CullMode?cullMode          = null,
            int?frontCounterClockwise  = null,
            int?depthBias              = null,
            float?depthBiasClamp       = null,
            float?slopeScaledDepthBias = null,
            int?depthClipEnable        = null,
            int?scissorEnable          = null,
            int?multisampleEnable      = null,
            int?antialiasedLineEnable  = null,
            uint?forcedSampleCount     = null
        ) : this()
        {
            if (fillMode is not null)
            {
                FillMode = fillMode.Value;
            }

            if (cullMode is not null)
            {
                CullMode = cullMode.Value;
            }

            if (frontCounterClockwise is not null)
            {
                FrontCounterClockwise = frontCounterClockwise.Value;
            }

            if (depthBias is not null)
            {
                DepthBias = depthBias.Value;
            }

            if (depthBiasClamp is not null)
            {
                DepthBiasClamp = depthBiasClamp.Value;
            }

            if (slopeScaledDepthBias is not null)
            {
                SlopeScaledDepthBias = slopeScaledDepthBias.Value;
            }

            if (depthClipEnable is not null)
            {
                DepthClipEnable = depthClipEnable.Value;
            }

            if (scissorEnable is not null)
            {
                ScissorEnable = scissorEnable.Value;
            }

            if (multisampleEnable is not null)
            {
                MultisampleEnable = multisampleEnable.Value;
            }

            if (antialiasedLineEnable is not null)
            {
                AntialiasedLineEnable = antialiasedLineEnable.Value;
            }

            if (forcedSampleCount is not null)
            {
                ForcedSampleCount = forcedSampleCount.Value;
            }
        }
Пример #2
0
 /// <summary>
 /// Creates a new instance of the solidcolor pen with the specific color.
 /// </summary>
 /// <param name="color"></param>
 /// <param name="cullMode">The explicit cull mode to be used. If not set the default mode of the rendercontext will be used.</param>
 public SolidColorPen(Color color, CullMode?cullMode = null)
 {
     _cullMode = cullMode;
     Color     = color;
 }
Пример #3
0
 public MaterialInfo(MaterialPass materialPass)
 {
     MaterialPass = materialPass;
     CullMode     = materialPass.CullMode;
 }
Пример #4
0
 /// <summary>
 /// Creates a new instance of the VertexColorPen.
 /// </summary>
 /// <param name="cullMode">The explicit cull mode to be used. If not set the default mode of the rendercontext will be used.</param>
 public VertexColorPen(CullMode? cullMode = null)
 {
     _cullMode = cullMode;
 }