Ejemplo n.º 1
0
        public override int CompareTo(Attribute o)
        {
            if (type != o.type)
            {
                return((int)(type - o.type));
            }
            DepthTestAttribute other = (DepthTestAttribute)o;

            if (depthFunc != other.depthFunc)
            {
                return(depthFunc - other.depthFunc);
            }
            if (depthMask != other.depthMask)
            {
                return(depthMask ? -1 : 1);
            }
            if (!MathHelper.isEqual(depthRangeNear, other.depthRangeNear))
            {
                return(depthRangeNear < other.depthRangeNear ? -1 : 1);
            }
            if (!MathHelper.isEqual(depthRangeFar, other.depthRangeFar))
            {
                return(depthRangeFar < other.depthRangeFar ? -1 : 1);
            }
            return(0);
        }
Ejemplo n.º 2
0
 public DepthTestAttribute(DepthTestAttribute mask) : this(mask.type, mask.depthFunc, mask.depthRangeNear, mask.depthRangeFar, mask.depthMask)
 {
 }