Exemplo n.º 1
0
        internal static BlendId CreateBlendState(BlendStateDescription description)
        {
            var id = new BlendId {
                Index = BlendStates.Allocate()
            };

            MyArrayHelpers.Reserve(ref BlendObjects, id.Index + 1);

            BlendStates.Data[id.Index] = description.Clone();

            InitBlendState(id);
            BlendIndices.Add(id);

            return(id);
        }
Exemplo n.º 2
0
        public static void CreateBlendState(ref BlendId id, BlendStateDescription description)
        {
            if (id == BlendId.NULL)
            {
                id = new BlendId(BlendStates.Allocate());
                MyArrayHelpers.Reserve(ref BlendObjects, id.Index + 1);
                BlendIndices.Add(id);
            }
            else
            {
                BlendObjects[id.Index].Dispose();
            }

            BlendStates.Data[id.Index] = description.Clone();
            InitBlendState(id);
        }
Exemplo n.º 3
0
        public static void CreateBlendState(ref BlendId id, BlendStateDescription description)
        {
            if (id == BlendId.NULL)
            {
                id = new BlendId(BlendStates.Allocate());
                MyArrayHelpers.Reserve(ref BlendObjects, id.Index + 1);
                BlendIndices.Add(id);
            }
            else
            {
                BlendObjects[id.Index].Dispose();
            }

            BlendStates.Data[id.Index] = description.Clone();
            InitBlendState(id);
        }
Exemplo n.º 4
0
 /// <summary>
 /// ブレンディング ステートをセットする
 /// </summary>
 /// <param name="d"></param>
 public void SetBlendDesc(BlendStateDescription d)
 {
     m_blendDesc = d.Clone();
 }