Diligent Engine API Reference
Public Member Functions | Protected Attributes | List of all members
Diligent::SwapChainBase< BaseInterface, SwapChainAllocator > Class Template Reference

Base implementation of the swap chain. More...

Inheritance diagram for Diligent::SwapChainBase< BaseInterface, SwapChainAllocator >:
Diligent::ObjectBase< BaseInterface, SwapChainAllocator > Diligent::RefCountedObject< BaseInterface, SwapChainAllocator >

Public Member Functions

 SwapChainBase (SwapChainAllocator &Allocator, IRenderDevice *pDevice, IDeviceContext *pDeviceContext, const SwapChainDesc &SCDesc)
 
virtual const SwapChainDescGetDesc () const override final
 Implementation of ISwapChain::GetDesc()
 

Protected Attributes

Diligent::RefCntAutoPtr< IRenderDevicem_pRenderDevice
 Strong reference to the render device.
 
Diligent::RefCntWeakPtr< IDeviceContextm_wpDeviceContext
 Weak references to the immediate device context. The context holds the strong reference to the swap chain.
 
SwapChainDesc m_SwapChainDesc
 Swap chain description.
 

Detailed Description

template<class BaseInterface, class SwapChainAllocator>
class Diligent::SwapChainBase< BaseInterface, SwapChainAllocator >

Base implementation of the swap chain.

Template Parameters
BaseInterface- base interface that this class will inheret (Diligent::ISwapChainGL, Diligent::ISwapChainD3D11, or Diligent::ISwapChainD3D12).
SwapChainAllocator- type of the allocator that is used to allocate memory for the swap chain object instance
Remarks
Swap chain holds the strong reference to the device and a weak reference to the immediate context.

Constructor & Destructor Documentation

template<class BaseInterface, class SwapChainAllocator>
Diligent::SwapChainBase< BaseInterface, SwapChainAllocator >::SwapChainBase ( SwapChainAllocator &  Allocator,
IRenderDevice pDevice,
IDeviceContext pDeviceContext,
const SwapChainDesc SCDesc 
)
inline
Parameters
Allocator- allocator that was used to allocate memory for this instance of the swap chain object
pDevice- pointer to the device.
pDeviceContext- pointer to the device context.
SCDesc- swap chain description