public static void SetConstantBufferToNextSlot(this CommonShaderStage shader, SharpDX.Direct3D11.Buffer constantBuffer, ConstantBufferSlotsCache cache) { var slot = cache.GetNext(); shader.SetConstantBuffer(slot, constantBuffer); }
public static void SetConstantBuffer(this CommonShaderStage shader, int slot, SharpDX.Direct3D11.Buffer constantBuffer, ConstantBufferSlotsCache cache) { cache.SetOccupied(slot); shader.SetConstantBuffer(slot, constantBuffer); }