Exemple #1
0
        public virtual uint GetWordCount()
        {
            uint wordCount = 1;

            if (Enumerant.Bias == (Value & Enumerant.Bias))
            {
                wordCount += Bias.GetWordCount();
            }
            if (Enumerant.Lod == (Value & Enumerant.Lod))
            {
                wordCount += Lod.GetWordCount();
            }
            if (Enumerant.Grad == (Value & Enumerant.Grad))
            {
                wordCount += Grad1.GetWordCount();
                wordCount += Grad2.GetWordCount();
            }
            if (Enumerant.ConstOffset == (Value & Enumerant.ConstOffset))
            {
                wordCount += ConstOffset.GetWordCount();
            }
            if (Enumerant.Offset == (Value & Enumerant.Offset))
            {
                wordCount += Offset.GetWordCount();
            }
            if (Enumerant.ConstOffsets == (Value & Enumerant.ConstOffsets))
            {
                wordCount += ConstOffsets.GetWordCount();
            }
            if (Enumerant.Sample == (Value & Enumerant.Sample))
            {
                wordCount += Sample.GetWordCount();
            }
            if (Enumerant.MinLod == (Value & Enumerant.MinLod))
            {
                wordCount += MinLod.GetWordCount();
            }
            if (Enumerant.MakeTexelAvailable == (Value & Enumerant.MakeTexelAvailable))
            {
                wordCount += MakeTexelAvailable.GetWordCount();
            }
            if (Enumerant.MakeTexelAvailableKHR == (Value & Enumerant.MakeTexelAvailableKHR))
            {
                wordCount += MakeTexelAvailableKHR.GetWordCount();
            }
            if (Enumerant.MakeTexelVisible == (Value & Enumerant.MakeTexelVisible))
            {
                wordCount += MakeTexelVisible.GetWordCount();
            }
            if (Enumerant.MakeTexelVisibleKHR == (Value & Enumerant.MakeTexelVisibleKHR))
            {
                wordCount += MakeTexelVisibleKHR.GetWordCount();
            }
            return(wordCount);
        }
Exemple #2
0
 public void Write(WordWriter writer)
 {
     writer.WriteWord((uint)Value);
     if (Enumerant.Bias == (Value & Enumerant.Bias))
     {
         Bias.Write(writer);
     }
     if (Enumerant.Lod == (Value & Enumerant.Lod))
     {
         Lod.Write(writer);
     }
     if (Enumerant.Grad == (Value & Enumerant.Grad))
     {
         Grad1.Write(writer);
         Grad2.Write(writer);
     }
     if (Enumerant.ConstOffset == (Value & Enumerant.ConstOffset))
     {
         ConstOffset.Write(writer);
     }
     if (Enumerant.Offset == (Value & Enumerant.Offset))
     {
         Offset.Write(writer);
     }
     if (Enumerant.ConstOffsets == (Value & Enumerant.ConstOffsets))
     {
         ConstOffsets.Write(writer);
     }
     if (Enumerant.Sample == (Value & Enumerant.Sample))
     {
         Sample.Write(writer);
     }
     if (Enumerant.MinLod == (Value & Enumerant.MinLod))
     {
         MinLod.Write(writer);
     }
     if (Enumerant.MakeTexelAvailable == (Value & Enumerant.MakeTexelAvailable))
     {
         MakeTexelAvailable.Write(writer);
     }
     if (Enumerant.MakeTexelAvailableKHR == (Value & Enumerant.MakeTexelAvailableKHR))
     {
         MakeTexelAvailableKHR.Write(writer);
     }
     if (Enumerant.MakeTexelVisible == (Value & Enumerant.MakeTexelVisible))
     {
         MakeTexelVisible.Write(writer);
     }
     if (Enumerant.MakeTexelVisibleKHR == (Value & Enumerant.MakeTexelVisibleKHR))
     {
         MakeTexelVisibleKHR.Write(writer);
     }
 }