Ejemplo n.º 1
0
 private static void InitDepthStencilState(DepthStencilId id)
 {
     if (DepthStencilObjects[id.Index] == null)
         DepthStencilObjects[id.Index] = new DepthStencilState(MyRender11.Device, DepthStencilStates.Data[id.Index]);
 }
Ejemplo n.º 2
0
        public static void CreateDepthStencil(ref DepthStencilId id, DepthStencilStateDescription description)
        {
            if (id == DepthStencilId.NULL)
            {
                id = new DepthStencilId(DepthStencilStates.Allocate());
                MyArrayHelpers.Reserve(ref DepthStencilObjects, id.Index + 1);
                DepthStencilIndices.Add(id);
            }
            else
            {
                DepthStencilObjects[id.Index].Dispose();
            }

            DepthStencilStates.Data[id.Index] = description;
            InitDepthStencilState(id);
        }
Ejemplo n.º 3
0
 internal static DepthStencilState GetDepthStencil(DepthStencilId id)
 {
     return DepthStencilObjects[id.Index];
 }
Ejemplo n.º 4
0
 public static DepthStencilId CreateDepthStencil(DepthStencilStateDescription description)
 {
     DepthStencilId id = new DepthStencilId();
     CreateDepthStencil(ref id, description);
     return id;
 }