private static void InitDepthStencilState(DepthStencilId id) { if (DepthStencilObjects[id.Index] == null) DepthStencilObjects[id.Index] = new DepthStencilState(MyRender11.Device, DepthStencilStates.Data[id.Index]); }
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); }
internal static DepthStencilState GetDepthStencil(DepthStencilId id) { return DepthStencilObjects[id.Index]; }
public static DepthStencilId CreateDepthStencil(DepthStencilStateDescription description) { DepthStencilId id = new DepthStencilId(); CreateDepthStencil(ref id, description); return id; }