Game Development Reference
In-Depth Information
instance.BackBuffer = instance.SwapChain.GetBackBuffer(0,
BackBufferType.Mono);
if (instance.BackBuffer != null)
{
instance.SwapChain.Device.SetRenderTarget(0,
instance.BackBuffer);
}
}
}
This method completes the rendering process for a specific swap chain that is ref-
erenced by a unique identifier.
public void EndSwapChainRender(int id)
{
if (!_ready)
return;
SwapChainInstance instance = null;
if (_activeSwapChain != null)
{
if (_activeSwapChain.Id == id)
instance = _activeSwapChain;
else
_activeSwapChain = instance = FindSwapChainInstance(id);
}
if (instance != null)
{
if (instance.BackBuffer != null && instance.SwapChain != null)
{
using (instance.BackBuffer)
{
instance.SwapChain.Present(instance.RenderTarget);
}
instance.BackBuffer = null;
}
}
_activeSwapChain = null;
}
Search Nedrilad ::




Custom Search