Esempio n. 1
0
        public void Set(IUniformValue source)
        {
            UniformValueSampler other = source as UniformValueSampler;

            if (other == null)
            {
                return;
            }
            _sampler = other._sampler;
            _slot    = other._slot;
        }
Esempio n. 2
0
        public override bool Equals(object obj)
        {
            UniformValueSampler o = obj as UniformValueSampler;

            if (o == null)
            {
                return(false);
            }
            return(_sampler == o._sampler &&
                   _sampler.Texture == o._sampler.Texture &&
                   _slot == o._slot);
        }
Esempio n. 3
0
        public int CompareTo(IUniformValue other)
        {
            UniformValueTexture oTex = other as UniformValueTexture;

            if (oTex != null)
            {
                return(Texture.ID.CompareTo(oTex.Texture.ID));
            }
            UniformValueSampler oSampler = other as UniformValueSampler;

            if (oSampler != null)
            {
                return(Texture.ID.CompareTo(oSampler.Sampler.Texture.ID));
            }
            return(-1);
        }
Esempio n. 4
0
 public bool Equals(UniformValueSampler o)
 {
     return(_sampler == o._sampler &&
            _sampler.Texture == o._sampler.Texture &&
            _slot == o._slot);
 }