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

Base implementation of the swap chain. More...

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

Public Member Functions

 SwapChainBase (IReferenceCounters *pRefCounters, 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 Diligent::SwapChainBase< BaseInterface >

Base implementation of the swap chain.

Template Parameters
BaseInterface- base interface that this class will inheret (Diligent::ISwapChainGL, Diligent::ISwapChainD3D11, or Diligent::ISwapChainD3D12).
Remarks
Swap chain holds the strong reference to the device and a weak reference to the immediate context.

Constructor & Destructor Documentation

◆ SwapChainBase()

template<class BaseInterface>
Diligent::SwapChainBase< BaseInterface >::SwapChainBase ( IReferenceCounters *  pRefCounters,
IRenderDevice pDevice,
IDeviceContext pDeviceContext,
const SwapChainDesc SCDesc 
)
inline
Parameters
pRefCounters- reference counters object that controls the lifetime of this swap chain.
pDevice- pointer to the device.
pDeviceContext- pointer to the device context.
SCDesc- swap chain description