Beispiel #1
0
 bool CanUseAsImpl(
     AttrInfo info,
     AttrCase channel,
     TermFlavor flavor)
 {
     return(info.IsFactor(flavor, channel));
 }
Beispiel #2
0
        D3D11_BLEND GetTermBlendDescImpl(
            TermInfo info,
            AttrCase channel,
            TermFlavor flavor)
        {
            // Need to look for a match on our target type
            var left  = info._left;
            var right = info._right;

            AttrInfo factor = null;

            if (left.IsFactor(flavor, channel))
            {
                factor = right;
            }
            else if (right.IsFactor(flavor, channel))
            {
                factor = left;
            }
            else
            {
                throw OperationTooComplexError(info.Range);
            }

            return(GetFactorBlendDesc(
                       factor,
                       channel));
        }
Beispiel #3
0
 D3D11_BLEND GetTermBlendDesc(
     AttrInfo info,
     AttrCase channel,
     TermFlavor flavor)
 {
     return(GetTermBlendDescImpl((dynamic)info, channel, flavor));
 }
Beispiel #4
0
 public override bool IsFactor(
     TermFlavor flavor,
     AttrCase channel)
 {
     if (flavor == TermFlavor.Dest)
     {
         if (channel == AttrCase.Color)
         {
             return(_color == D3D11_BLEND.D3D11_BLEND_DEST_COLOR);
         }
         else if (channel == AttrCase.Alpha)
         {
             return(_alpha == D3D11_BLEND.D3D11_BLEND_DEST_ALPHA);
         }
     }
     else if (flavor == TermFlavor.Src)
     {
         if (channel == AttrCase.Color)
         {
             return(_color == D3D11_BLEND.D3D11_BLEND_SRC_COLOR);
         }
         else if (channel == AttrCase.Alpha)
         {
             return(_alpha == D3D11_BLEND.D3D11_BLEND_SRC_ALPHA);
         }
     }
     return(false);
 }
Beispiel #5
0
 public override bool IsFactor(
     TermFlavor flavor,
     AttrCase channel)
 {
     if (flavor == TermFlavor.Dest)
     {
         return(true);
     }
     return(false);
 }
Beispiel #6
0
 bool CanUseAs(
     AttrInfo info,
     AttrCase channel,
     TermFlavor flavor)
 {
     if (info.IsFactor(flavor, channel))
     {
         return(true);
     }
     return(CanUseAsImpl((dynamic)info, channel, flavor));
 }
Beispiel #7
0
        D3D11_BLEND GetTermBlendDescImpl(
            AttrInfo info,
            AttrCase channel,
            TermFlavor flavor)
        {
            if (info.IsFactor(flavor, channel))
            {
                return(D3D11_BLEND.D3D11_BLEND_ONE);
            }

            throw OperationTooComplexError(info.Range);
        }
Beispiel #8
0
        bool CanUseAsImpl(
            TermInfo info,
            AttrCase channel,
            TermFlavor flavor)
        {
            var  left        = info._left;
            var  right       = info._right;
            bool canUseLeft  = CanUseAs(left, channel, flavor);
            bool canUseRight = CanUseAs(right, channel, flavor);

            return(canUseLeft || canUseRight);
        }
 public virtual bool IsFactor(
     TermFlavor flavor,
     AttrCase channel)
 {
     return false;
 }
        D3D11_BLEND GetTermBlendDescImpl(
            TermInfo info,
            AttrCase channel,
            TermFlavor flavor)
        {
            // Need to look for a match on our target type
            var left = info._left;
            var right = info._right;

            AttrInfo factor = null;
            if (left.IsFactor(flavor, channel))
            {
                factor = right;
            }
            else if (right.IsFactor(flavor, channel))
            {
                factor = left;
            }
            else
            {
                throw OperationTooComplexError(info.Range);
            }

            return GetFactorBlendDesc(
                factor,
                channel );
        }
        D3D11_BLEND GetTermBlendDescImpl(
            AttrInfo info,
            AttrCase channel,
            TermFlavor flavor)
        {
            if (info.IsFactor(flavor, channel))
            {
                return D3D11_BLEND.D3D11_BLEND_ONE;
            }

            throw OperationTooComplexError(info.Range);
        }
 D3D11_BLEND GetTermBlendDesc(
     AttrInfo info,
     AttrCase channel,
     TermFlavor flavor)
 {
     return GetTermBlendDescImpl((dynamic)info, channel, flavor);
 }
 bool CanUseAsImpl(
     AttrInfo info,
     AttrCase channel,
     TermFlavor flavor)
 {
     return info.IsFactor(flavor, channel);
 }
 bool CanUseAsImpl(
     TermInfo info,
     AttrCase channel,
     TermFlavor flavor)
 {
     var left = info._left;
     var right = info._right;
     bool canUseLeft = CanUseAs(left, channel, flavor);
     bool canUseRight = CanUseAs(right, channel, flavor);
     return canUseLeft || canUseRight;
 }
 public override bool IsFactor(
     TermFlavor flavor,
     AttrCase channel)
 {
     if (flavor == TermFlavor.Dest)
         return true;
     return false;
 }
 bool CanUseAs(
     AttrInfo info,
     AttrCase channel,
     TermFlavor flavor)
 {
     if (info.IsFactor(flavor, channel))
         return true;
     return CanUseAsImpl((dynamic)info, channel, flavor);
 }
 public override bool IsFactor(
     TermFlavor flavor,
     AttrCase channel)
 {
     if (flavor == TermFlavor.Dest)
     {
         if (channel == AttrCase.Color)
             return _color == D3D11_BLEND.D3D11_BLEND_DEST_COLOR;
         else if (channel == AttrCase.Alpha)
             return _alpha == D3D11_BLEND.D3D11_BLEND_DEST_ALPHA;
     }
     else if (flavor == TermFlavor.Src)
     {
         if (channel == AttrCase.Color)
             return _color == D3D11_BLEND.D3D11_BLEND_SRC_COLOR;
         else if (channel == AttrCase.Alpha)
             return _alpha == D3D11_BLEND.D3D11_BLEND_SRC_ALPHA;
     }
     return false;
 }
Beispiel #18
0
 public virtual bool IsFactor(
     TermFlavor flavor,
     AttrCase channel)
 {
     return(false);
 }