DDraceNetwork Docs
CGraphicsBackend_Threaded Class Reference

#include <backend_sdl.h>

Inheritance diagram for CGraphicsBackend_Threaded:
[legend]
Collaboration diagram for CGraphicsBackend_Threaded:
[legend]

Classes

class  ICommandProcessor
 

Public Member Functions

 CGraphicsBackend_Threaded (TTranslateFunc &&TranslateFunc)
 
void RunBuffer (CCommandBuffer *pBuffer) override
 
void RunBufferSingleThreadedUnsafe (CCommandBuffer *pBuffer) override
 
bool IsIdle () const override
 
void WaitForIdle () override
 
void ProcessError (const SGfxErrorContainer &Error)
 
bool GetWarning (std::vector< std::string > &WarningStrings) override
 
- Public Member Functions inherited from IGraphicsBackend
virtual ~IGraphicsBackend ()=default
 
virtual int Init (const char *pName, int *pScreen, int *pWidth, int *pHeight, int *pRefreshRate, int *pFsaaSamples, int Flags, int *pDesktopWidth, int *pDesktopHeight, int *pCurrentWidth, int *pCurrentHeight, class IStorage *pStorage)=0
 
virtual int Shutdown ()=0
 
virtual uint64_t TextureMemoryUsage () const =0
 
virtual uint64_t BufferMemoryUsage () const =0
 
virtual uint64_t StreamedMemoryUsage () const =0
 
virtual uint64_t StagingMemoryUsage () const =0
 
virtual const TTwGraphicsGpuListGetGpus () const =0
 
virtual void GetVideoModes (CVideoMode *pModes, int MaxModes, int *pNumModes, int HiDPIScale, int MaxWindowWidth, int MaxWindowHeight, int Screen)=0
 
virtual void GetCurrentVideoMode (CVideoMode &CurMode, int HiDPIScale, int MaxWindowWidth, int MaxWindowHeight, int Screen)=0
 
virtual int GetNumScreens () const =0
 
virtual const char * GetScreenName (int Screen) const =0
 
virtual void Minimize ()=0
 
virtual void Maximize ()=0
 
virtual void SetWindowParams (int FullscreenMode, bool IsBorderless)=0
 
virtual bool SetWindowScreen (int Index)=0
 
virtual bool UpdateDisplayMode (int Index)=0
 
virtual int GetWindowScreen ()=0
 
virtual int WindowActive ()=0
 
virtual int WindowOpen ()=0
 
virtual void SetWindowGrab (bool Grab)=0
 
virtual bool ResizeWindow (int w, int h, int RefreshRate)=0
 
virtual void GetViewportSize (int &w, int &h)=0
 
virtual void NotifyWindow ()=0
 
virtual void WindowDestroyNtf (uint32_t WindowId)=0
 
virtual void WindowCreateNtf (uint32_t WindowId)=0
 
virtual void RunBuffer (CCommandBuffer *pBuffer)=0
 
virtual void RunBufferSingleThreadedUnsafe (CCommandBuffer *pBuffer)=0
 
virtual bool IsIdle () const =0
 
virtual void WaitForIdle ()=0
 
virtual bool GetDriverVersion (EGraphicsDriverAgeType DriverAgeType, int &Major, int &Minor, int &Patch, const char *&pName, EBackendType BackendType)=0
 
virtual bool IsConfigModernAPI ()
 
virtual bool UseTrianglesAsQuad ()
 
virtual bool HasTileBuffering ()
 
virtual bool HasQuadBuffering ()
 
virtual bool HasTextBuffering ()
 
virtual bool HasQuadContainerBuffering ()
 
virtual bool Uses2DTextureArrays ()
 
virtual bool HasTextureArraysSupport ()
 
virtual const char * GetErrorString ()
 
virtual const char * GetVendorString ()=0
 
virtual const char * GetVersionString ()=0
 
virtual const char * GetRendererString ()=0
 
virtual TGLBackendReadPresentedImageDataGetReadPresentedImageDataFuncUnsafe ()=0
 
virtual bool GetWarning (std::vector< std::string > &WarningStrings)=0
 
virtual bool ShowMessageBox (unsigned Type, const char *pTitle, const char *pMsg)=0
 

Protected Member Functions

void StartProcessor (ICommandProcessor *pProcessor)
 
void StopProcessor ()
 
bool HasWarning ()
 

Static Private Member Functions

static void ThreadFunc (void *pUser)
 

Private Attributes

TTranslateFunc m_TranslateFunc
 
SGfxWarningContainer m_Warning
 
ICommandProcessorm_pProcessor
 
std::mutex m_BufferSwapMutex
 
std::condition_variable m_BufferSwapCond
 
CCommandBufferm_pBuffer
 
std::atomic_bool m_Shutdown
 
bool m_Started = false
 
std::atomic_bool m_BufferInProcess
 
void * m_pThread
 

Additional Inherited Members

- Public Types inherited from IGraphicsBackend
enum  {
  INITFLAG_FULLSCREEN = 1 << 0 , INITFLAG_VSYNC = 1 << 1 , INITFLAG_RESIZABLE = 1 << 2 , INITFLAG_BORDERLESS = 1 << 3 ,
  INITFLAG_HIGHDPI = 1 << 4 , INITFLAG_DESKTOP_FULLSCREEN = 1 << 5
}
 

Constructor & Destructor Documentation

◆ CGraphicsBackend_Threaded()

CGraphicsBackend_Threaded::CGraphicsBackend_Threaded ( TTranslateFunc &&  TranslateFunc)

Member Function Documentation

◆ GetWarning()

bool CGraphicsBackend_Threaded::GetWarning ( std::vector< std::string > &  WarningStrings)
overridevirtual

Implements IGraphicsBackend.

◆ HasWarning()

bool CGraphicsBackend_Threaded::HasWarning ( )
inlineprotected

◆ IsIdle()

bool CGraphicsBackend_Threaded::IsIdle ( ) const
overridevirtual

Implements IGraphicsBackend.

◆ ProcessError()

void CGraphicsBackend_Threaded::ProcessError ( const SGfxErrorContainer Error)

◆ RunBuffer()

void CGraphicsBackend_Threaded::RunBuffer ( CCommandBuffer pBuffer)
overridevirtual

Implements IGraphicsBackend.

◆ RunBufferSingleThreadedUnsafe()

void CGraphicsBackend_Threaded::RunBufferSingleThreadedUnsafe ( CCommandBuffer pBuffer)
overridevirtual

Implements IGraphicsBackend.

◆ StartProcessor()

void CGraphicsBackend_Threaded::StartProcessor ( ICommandProcessor pProcessor)
protected

◆ StopProcessor()

void CGraphicsBackend_Threaded::StopProcessor ( )
protected

◆ ThreadFunc()

void CGraphicsBackend_Threaded::ThreadFunc ( void *  pUser)
staticprivate

◆ WaitForIdle()

void CGraphicsBackend_Threaded::WaitForIdle ( )
overridevirtual

Implements IGraphicsBackend.

Member Data Documentation

◆ m_BufferInProcess

std::atomic_bool CGraphicsBackend_Threaded::m_BufferInProcess
private

◆ m_BufferSwapCond

std::condition_variable CGraphicsBackend_Threaded::m_BufferSwapCond
private

◆ m_BufferSwapMutex

std::mutex CGraphicsBackend_Threaded::m_BufferSwapMutex
private

◆ m_pBuffer

CCommandBuffer* CGraphicsBackend_Threaded::m_pBuffer
private

◆ m_pProcessor

ICommandProcessor* CGraphicsBackend_Threaded::m_pProcessor
private

◆ m_pThread

void* CGraphicsBackend_Threaded::m_pThread
private

◆ m_Shutdown

std::atomic_bool CGraphicsBackend_Threaded::m_Shutdown
private

◆ m_Started

bool CGraphicsBackend_Threaded::m_Started = false
private

◆ m_TranslateFunc

TTranslateFunc CGraphicsBackend_Threaded::m_TranslateFunc
private

◆ m_Warning

SGfxWarningContainer CGraphicsBackend_Threaded::m_Warning
private

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