Game Development Reference
In-Depth Information
on which child it wants to render. The IRenderWindow interface will be implemented
by all child windows to make the Render() method publicly accessible.
public interface IRenderWindow
void Render();
The next section of code describes an associative container class that contains ref-
erences to a swap chain, present parameters, back buffer, and render target control.
This class also contains a unique identifier and makes the association of a swap
chain to a child window extremely easy.
internal class SwapChainInstance
private int _id;
private SwapChain _swapChain;
private PresentParameters _presentParameters;
private Surface _backBuffer;
private Control _renderTarget;
public int Id
get { return _id; }
set { _id = value; }
public SwapChain SwapChain
get { return _swapChain; }
set { _swapChain = value; }
public PresentParameters PresentParameters
get { return _presentParameters; }
set { _presentParameters = value; }
public Surface BackBuffer
get { return _backBuffer; }
set { _backBuffer = value; }
Search Nedrilad ::

Custom Search