DDraceNetwork Docs
IEngineGraphics Class Referenceabstract

#include <graphics.h>

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

Public Member Functions

virtual int Init ()=0
 
virtual void Shutdown () override=0
 
virtual void Minimize ()=0
 
virtual void Maximize ()=0
 
virtual int WindowActive ()=0
 
virtual int WindowOpen ()=0
 
- Public Member Functions inherited from IGraphics
int ScreenWidth () const
 
int ScreenHeight () const
 
float ScreenAspect () const
 
float ScreenHiDPIScale () const
 
int WindowWidth () const
 
int WindowHeight () const
 
virtual void WarnPngliteIncompatibleImages (bool Warn)=0
 
virtual void SetWindowParams (int FullscreenMode, bool IsBorderless)=0
 
virtual bool SetWindowScreen (int Index)=0
 
virtual bool SetVSync (bool State)=0
 
virtual bool SetMultiSampling (uint32_t ReqMultiSamplingCount, uint32_t &MultiSamplingCountBackend)=0
 
virtual int GetWindowScreen ()=0
 
virtual void Move (int x, int y)=0
 
virtual bool Resize (int w, int h, int RefreshRate)=0
 
virtual void ResizeToScreen ()=0
 
virtual void GotResized (int w, int h, int RefreshRate)=0
 
virtual void UpdateViewport (int X, int Y, int W, int H, bool ByResize)=0
 
virtual void AddWindowResizeListener (WINDOW_RESIZE_FUNC pFunc)=0
 
virtual void AddWindowPropChangeListener (WINDOW_PROPS_CHANGED_FUNC pFunc)=0
 
virtual void WindowDestroyNtf (uint32_t WindowId)=0
 
virtual void WindowCreateNtf (uint32_t WindowId)=0
 
virtual void Clear (float r, float g, float b, bool ForceClearNow=false)=0
 
virtual void ClipEnable (int x, int y, int w, int h)=0
 
virtual void ClipDisable ()=0
 
virtual void MapScreen (float TopLeftX, float TopLeftY, float BottomRightX, float BottomRightY)=0
 
virtual void GetScreen (float *pTopLeftX, float *pTopLeftY, float *pBottomRightX, float *pBottomRightY)=0
 
virtual void BlendNone ()=0
 
virtual void BlendNormal ()=0
 
virtual void BlendAdditive ()=0
 
virtual void WrapNormal ()=0
 
virtual void WrapClamp ()=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 bool LoadPng (CImageInfo &Image, const char *pFilename, int StorageType)=0
 
virtual bool LoadPng (CImageInfo &Image, const uint8_t *pData, size_t DataSize, const char *pContextName)=0
 
virtual bool CheckImageDivisibility (const char *pContextName, CImageInfo &Image, int DivX, int DivY, bool AllowResize)=0
 
virtual bool IsImageFormatRgba (const char *pContextName, const CImageInfo &Image)=0
 
virtual void UnloadTexture (CTextureHandle *pIndex)=0
 
virtual CTextureHandle LoadTextureRaw (const CImageInfo &Image, int Flags, const char *pTexName=nullptr)=0
 
virtual CTextureHandle LoadTextureRawMove (CImageInfo &Image, int Flags, const char *pTexName=nullptr)=0
 
virtual CTextureHandle LoadTexture (const char *pFilename, int StorageType, int Flags=0)=0
 
virtual void TextureSet (CTextureHandle Texture)=0
 
void TextureClear ()
 
virtual bool LoadTextTextures (size_t Width, size_t Height, CTextureHandle &TextTexture, CTextureHandle &TextOutlineTexture, uint8_t *pTextData, uint8_t *pTextOutlineData)=0
 
virtual bool UnloadTextTextures (CTextureHandle &TextTexture, CTextureHandle &TextOutlineTexture)=0
 
virtual bool UpdateTextTexture (CTextureHandle TextureId, int x, int y, size_t Width, size_t Height, uint8_t *pData, bool IsMovedPointer)=0
 
virtual CTextureHandle LoadSpriteTexture (const CImageInfo &FromImageInfo, const struct CDataSprite *pSprite)=0
 
virtual bool IsImageSubFullyTransparent (const CImageInfo &FromImageInfo, int x, int y, int w, int h)=0
 
virtual bool IsSpriteTextureFullyTransparent (const CImageInfo &FromImageInfo, const struct CDataSprite *pSprite)=0
 
virtual void FlushVertices (bool KeepVertices=false)=0
 
virtual void FlushVerticesTex3D ()=0
 
virtual void RenderTileLayer (int BufferContainerIndex, const ColorRGBA &Color, char **pOffsets, unsigned int *pIndicedVertexDrawNum, size_t NumIndicesOffset)=0
 
virtual void RenderBorderTiles (int BufferContainerIndex, const ColorRGBA &Color, char *pIndexBufferOffset, const vec2 &Offset, const vec2 &Scale, uint32_t DrawNum)=0
 
virtual void RenderQuadLayer (int BufferContainerIndex, SQuadRenderInfo *pQuadInfo, size_t QuadNum, int QuadOffset)=0
 
virtual void RenderText (int BufferContainerIndex, int TextQuadNum, int TextureSize, int TextureTextIndex, int TextureTextOutlineIndex, const ColorRGBA &TextColor, const ColorRGBA &TextOutlineColor)=0
 
virtual int CreateBufferObject (size_t UploadDataSize, void *pUploadData, int CreateFlags, bool IsMovedPointer=false)=0
 
virtual void RecreateBufferObject (int BufferIndex, size_t UploadDataSize, void *pUploadData, int CreateFlags, bool IsMovedPointer=false)=0
 
virtual void DeleteBufferObject (int BufferIndex)=0
 
virtual int CreateBufferContainer (struct SBufferContainerInfo *pContainerInfo)=0
 
virtual void DeleteBufferContainer (int &ContainerIndex, bool DestroyAllBO=true)=0
 
virtual void IndicesNumRequiredNotify (unsigned int RequiredIndicesCount)=0
 
virtual bool GetDriverVersion (EGraphicsDriverAgeType DriverAgeType, int &Major, int &Minor, int &Patch, const char *&pName, EBackendType BackendType)=0
 
virtual bool IsConfigModernAPI ()=0
 
virtual bool IsTileBufferingEnabled ()=0
 
virtual bool IsQuadBufferingEnabled ()=0
 
virtual bool IsTextBufferingEnabled ()=0
 
virtual bool IsQuadContainerBufferingEnabled ()=0
 
virtual bool Uses2DTextureArrays ()=0
 
virtual bool HasTextureArraysSupport ()=0
 
virtual const char * GetVendorString ()=0
 
virtual const char * GetVersionString ()=0
 
virtual const char * GetRendererString ()=0
 
virtual void LinesBegin ()=0
 
virtual void LinesEnd ()=0
 
virtual void LinesDraw (const CLineItem *pArray, int Num)=0
 
virtual void QuadsBegin ()=0
 
virtual void QuadsEnd ()=0
 
virtual void QuadsTex3DBegin ()=0
 
virtual void QuadsTex3DEnd ()=0
 
virtual void TrianglesBegin ()=0
 
virtual void TrianglesEnd ()=0
 
virtual void QuadsEndKeepVertices ()=0
 
virtual void QuadsDrawCurrentVertices (bool KeepVertices=true)=0
 
virtual void QuadsSetRotation (float Angle)=0
 
virtual void QuadsSetSubset (float TopLeftU, float TopLeftV, float BottomRightU, float BottomRightV)=0
 
virtual void QuadsSetSubsetFree (float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3, int Index=-1)=0
 
virtual void QuadsDraw (CQuadItem *pArray, int Num)=0
 
virtual void QuadsDrawTL (const CQuadItem *pArray, int Num)=0
 
virtual void QuadsTex3DDrawTL (const CQuadItem *pArray, int Num)=0
 
virtual const GL_STexCoordGetCurTextureCoordinates ()=0
 
virtual const GL_SColorGetCurColor ()=0
 
virtual int CreateQuadContainer (bool AutomaticUpload=true)=0
 
virtual void QuadContainerChangeAutomaticUpload (int ContainerIndex, bool AutomaticUpload)=0
 
virtual void QuadContainerUpload (int ContainerIndex)=0
 
virtual int QuadContainerAddQuads (int ContainerIndex, CQuadItem *pArray, int Num)=0
 
virtual int QuadContainerAddQuads (int ContainerIndex, CFreeformItem *pArray, int Num)=0
 
virtual void QuadContainerReset (int ContainerIndex)=0
 
virtual void DeleteQuadContainer (int &ContainerIndex)=0
 
virtual void RenderQuadContainer (int ContainerIndex, int QuadDrawNum)=0
 
virtual void RenderQuadContainer (int ContainerIndex, int QuadOffset, int QuadDrawNum, bool ChangeWrapMode=true)=0
 
virtual void RenderQuadContainerEx (int ContainerIndex, int QuadOffset, int QuadDrawNum, float X, float Y, float ScaleX=1.f, float ScaleY=1.f)=0
 
virtual void RenderQuadContainerAsSprite (int ContainerIndex, int QuadOffset, float X, float Y, float ScaleX=1.f, float ScaleY=1.f)=0
 
virtual void RenderQuadContainerAsSpriteMultiple (int ContainerIndex, int QuadOffset, int DrawCount, SRenderSpriteInfo *pRenderInfo)=0
 
virtual void QuadsDrawFreeform (const CFreeformItem *pArray, int Num)=0
 
virtual void QuadsText (float x, float y, float Size, const char *pText)=0
 
virtual void DrawRectExt (float x, float y, float w, float h, float r, int Corners)=0
 
virtual void DrawRectExt4 (float x, float y, float w, float h, ColorRGBA ColorTopLeft, ColorRGBA ColorTopRight, ColorRGBA ColorBottomLeft, ColorRGBA ColorBottomRight, float r, int Corners)=0
 
virtual int CreateRectQuadContainer (float x, float y, float w, float h, float r, int Corners)=0
 
virtual void DrawRect (float x, float y, float w, float h, ColorRGBA Color, int Corners, float Rounding)=0
 
virtual void DrawRect4 (float x, float y, float w, float h, ColorRGBA ColorTopLeft, ColorRGBA ColorTopRight, ColorRGBA ColorBottomLeft, ColorRGBA ColorBottomRight, int Corners, float Rounding)=0
 
virtual void DrawCircle (float CenterX, float CenterY, float Radius, int Segments)=0
 
virtual void SetColorVertex (const CColorVertex *pArray, size_t Num)=0
 
virtual void SetColor (float r, float g, float b, float a)=0
 
virtual void SetColor (ColorRGBA Color)=0
 
virtual void SetColor4 (ColorRGBA TopLeft, ColorRGBA TopRight, ColorRGBA BottomLeft, ColorRGBA BottomRight)=0
 
virtual void ChangeColorOfCurrentQuadVertices (float r, float g, float b, float a)=0
 
virtual void ChangeColorOfQuadVertices (size_t QuadOffset, unsigned char r, unsigned char g, unsigned char b, unsigned char a)=0
 
virtual void ReadPixel (ivec2 Position, ColorRGBA *pColor)=0
 
virtual void TakeScreenshot (const char *pFilename)=0
 
virtual void TakeCustomScreenshot (const char *pFilename)=0
 
virtual int GetVideoModes (CVideoMode *pModes, int MaxModes, int Screen)=0
 
virtual void GetCurrentVideoMode (CVideoMode &CurMode, int Screen)=0
 
virtual void Swap ()=0
 
virtual int GetNumScreens () const =0
 
virtual const char * GetScreenName (int Screen) const =0
 
virtual void InsertSignal (class CSemaphore *pSemaphore)=0
 
virtual bool IsIdle () const =0
 
virtual void WaitForIdle ()=0
 
virtual void SetWindowGrab (bool Grab)=0
 
virtual void NotifyWindow ()=0
 
virtual TGLBackendReadPresentedImageDataGetReadPresentedImageDataFuncUnsafe ()=0
 
virtual SWarningGetCurWarning ()=0
 
virtual bool ShowMessageBox (unsigned Type, const char *pTitle, const char *pMsg)=0
 
virtual bool IsBackendInitialized ()=0
 
- Public Member Functions inherited from IInterface
 IInterface ()
 
virtual void Shutdown ()
 
virtual ~IInterface ()
 

Static Public Member Functions

static const char * InterfaceName ()
 
- Static Public Member Functions inherited from IGraphics
static const char * InterfaceName ()
 

Additional Inherited Members

- Public Types inherited from IGraphics
enum  { TEXLOAD_TO_3D_TEXTURE = 1 << 0 , TEXLOAD_TO_2D_ARRAY_TEXTURE = 1 << 1 , TEXLOAD_NO_2D_TEXTURE = 1 << 2 }
 
enum  EBufferObjectCreateFlags { BUFFER_OBJECT_CREATE_FLAGS_ONE_TIME_USE_BIT = 1 << 0 }
 
enum  {
  CORNER_NONE = 0 , CORNER_TL = 1 , CORNER_TR = 2 , CORNER_BL = 4 ,
  CORNER_BR = 8 , CORNER_T = CORNER_TL | CORNER_TR , CORNER_B = CORNER_BL | CORNER_BR , CORNER_R = CORNER_TR | CORNER_BR ,
  CORNER_L = CORNER_TL | CORNER_BL , CORNER_ALL = CORNER_T | CORNER_B
}
 
- Protected Member Functions inherited from IGraphics
CTextureHandle CreateTextureHandle (int Index)
 
- Protected Member Functions inherited from IInterface
IKernelKernel ()
 
- Protected Attributes inherited from IGraphics
int m_ScreenWidth
 
int m_ScreenHeight
 
int m_ScreenRefreshRate
 
float m_ScreenHiDPIScale
 

Member Function Documentation

◆ Init()

virtual int IEngineGraphics::Init ( )
pure virtual

Implemented in CGraphics_Threaded.

◆ InterfaceName()

static const char * IEngineGraphics::InterfaceName ( )
inlinestatic

◆ Maximize()

virtual void IEngineGraphics::Maximize ( )
pure virtual

Implemented in CGraphics_Threaded.

◆ Minimize()

virtual void IEngineGraphics::Minimize ( )
pure virtual

Implemented in CGraphics_Threaded.

◆ Shutdown()

virtual void IEngineGraphics::Shutdown ( )
overridepure virtual

Reimplemented from IInterface.

Implemented in CGraphics_Threaded.

◆ WindowActive()

virtual int IEngineGraphics::WindowActive ( )
pure virtual

Implemented in CGraphics_Threaded.

◆ WindowOpen()

virtual int IEngineGraphics::WindowOpen ( )
pure virtual

Implemented in CGraphics_Threaded.


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