Cogs.Rendering
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Cogs::ISwapChain Class Referenceabstract

#include <ISwapChain.h>

Public Member Functions

virtual ~ISwapChain ()=default
 
virtual void setSize (int newWidth, int newHeight, bool forceIt=false)=0
 Set the size of the main drawing buffer used by the graphics device in pixels.
 
virtual void setFullscreen (bool enabled)=0
 Switch this swap chain to fullscreen or windowed depending on the parameter.
 
virtual bool isFullscreen ()=0
 Test whether the current swap chain is fullscreen.
 
virtual void beginFrame ()=0
 Signal the beginning of a new frame to the graphics device.
 
virtual void endFrame (uint32_t syncInterval=0, uint32_t presentFlags=PresentFlags::None)=0
 Signal the end of a frame to the graphics device.
 
virtual const RenderTargetHandlegetRenderTarget () const =0
 Returns the render target managed by this swap chain.
 
virtual const DepthStencilHandlegetDepthStencil () const =0
 Returns the depth stencil managed by this swap chain.
 
virtual int getWidth () const =0
 Returns the pixel width of this swap chain.
 
virtual int getHeight () const =0
 Returns the pixel height of this swap chain.
 
virtual int getSamples () const =0
 Returns the number of samples this swap chain has.
 

Protected Attributes

WindowData * windowData = nullptr
 

Constructor & Destructor Documentation

◆ ~ISwapChain()

virtual Cogs::ISwapChain::~ISwapChain ( )
virtualdefault

Member Function Documentation

◆ beginFrame()

virtual void Cogs::ISwapChain::beginFrame ( )
pure virtual

Signal the beginning of a new frame to the graphics device.

◆ endFrame()

virtual void Cogs::ISwapChain::endFrame ( uint32_t  syncInterval = 0,
uint32_t  presentFlags = PresentFlags::None 
)
pure virtual

Signal the end of a frame to the graphics device.

When the graphics device itself is responsible for managing the device context (e.g in D3D11), and the PresentFlags::NoSwap flag is not set, this will swap the back buffer to make the result of previous drawing visible.

Parameters
syncIntervalSynchronization interval.
  • 0 - No synchronization, presentation occurs immediately.
  • 1 - Synchronize presentation after 1 vertical blank.
presentFlagsA combination of PresentFlags controlling the presentation of the rendered frame.
See also
PresentFlags

◆ getDepthStencil()

virtual const DepthStencilHandle & Cogs::ISwapChain::getDepthStencil ( ) const
pure virtual

Returns the depth stencil managed by this swap chain.

◆ getHeight()

virtual int Cogs::ISwapChain::getHeight ( ) const
pure virtual

Returns the pixel height of this swap chain.

◆ getRenderTarget()

virtual const RenderTargetHandle & Cogs::ISwapChain::getRenderTarget ( ) const
pure virtual

Returns the render target managed by this swap chain.

◆ getSamples()

virtual int Cogs::ISwapChain::getSamples ( ) const
pure virtual

Returns the number of samples this swap chain has.

◆ getWidth()

virtual int Cogs::ISwapChain::getWidth ( ) const
pure virtual

Returns the pixel width of this swap chain.

◆ isFullscreen()

virtual bool Cogs::ISwapChain::isFullscreen ( )
pure virtual

Test whether the current swap chain is fullscreen.

◆ setFullscreen()

virtual void Cogs::ISwapChain::setFullscreen ( bool  enabled)
pure virtual

Switch this swap chain to fullscreen or windowed depending on the parameter.

◆ setSize()

virtual void Cogs::ISwapChain::setSize ( int  newWidth,
int  newHeight,
bool  forceIt = false 
)
pure virtual

Set the size of the main drawing buffer used by the graphics device in pixels.

Parameters
newWidthWidth of the drawing buffer in pixels.
newHeightHeight of the drawing buffer in pixels.
forceItForce the resize even if the new width and height are identical to the existing values.

Member Data Documentation

◆ windowData

WindowData* Cogs::ISwapChain::windowData = nullptr
protected

The documentation for this class was generated from the following file: