ScummVM API documentation
hpl::iLowLevelGraphics Class Referenceabstract

Public Member Functions

virtual bool Init (int alWidth, int alHeight, int alBpp, int abFullscreen, int alMultisampling, const tString &asWindowCaption)=0
 
virtual int GetCaps (eGraphicCaps aType) const =0
 
virtual void ShowCursor (bool abX)=0
 
virtual int GetMultisampling ()=0
 
virtual cVector2f GetScreenSize ()=0
 
virtual cVector2f GetVirtualSize ()=0
 
virtual void SetVirtualSize (cVector2f avSize)=0
 
virtual void SetMultisamplingActive (bool abX)=0
 
virtual void SetGammaCorrection (float afX)=0
 
virtual float GetGammaCorrection ()=0
 
virtual void SetClipPlane (int alIdx, const cPlanef &aPlane)=0
 
virtual cPlanef GetClipPlane (int alIdx, const cPlanef &aPlane)=0
 
virtual void SetClipPlaneActive (int alIdx, bool abX)=0
 
virtual Bitmap2DCreateBitmap2D (const cVector2l &avSize)=0
 
virtual FontDataCreateFontData (const tString &asName)=0
 
virtual iTextureCreateTexture (bool abUseMipMaps, eTextureType aType, eTextureTarget aTarget)=0
 
virtual iTextureCreateTexture (const tString &asName, bool abUseMipMaps, eTextureType aType, eTextureTarget aTarget)=0
 
virtual iTextureCreateTexture (Bitmap2D *apBmp, bool abUseMipMaps, eTextureType aType, eTextureTarget aTarget)=0
 
virtual iTextureCreateTexture (const cVector2l &avSize, int alBpp, cColor aFillCol, bool abUseMipMaps, eTextureType aType, eTextureTarget aTarget)=0
 
virtual Graphics::PixelFormatGetPixelFormat ()=0
 
virtual iGpuProgramCreateGpuProgram (const tString &vertex, const tString &fragment)=0
 
virtual void SaveScreenToBMP (const tString &asFile)=0
 
virtual void PushMatrix (eMatrix aMtxType)=0
 
virtual void PopMatrix (eMatrix aMtxType)=0
 
virtual void SetIdentityMatrix (eMatrix aMtxType)=0
 
virtual void SetMatrix (eMatrix aMtxType, const cMatrixf &a_mtxA)=0
 
virtual void TranslateMatrix (eMatrix aMtxType, const cVector3f &avPos)=0
 
virtual void RotateMatrix (eMatrix aMtxType, const cVector3f &avRot)=0
 
virtual void ScaleMatrix (eMatrix aMtxType, const cVector3f &avScale)=0
 
virtual void SetOrthoProjection (const cVector2f &avSize, float afMin, float afMax)=0
 
virtual iOcclusionQueryCreateOcclusionQuery ()=0
 
virtual void DestroyOcclusionQuery (iOcclusionQuery *apQuery)=0
 
virtual void ClearScreen ()=0
 
virtual void SetClearColor (const cColor &aCol)=0
 
virtual void SetClearDepth (float afDepth)=0
 
virtual void SetClearStencil (int alVal)=0
 
virtual void SetClearColorActive (bool abX)=0
 
virtual void SetClearDepthActive (bool abX)=0
 
virtual void SetClearStencilActive (bool abX)=0
 
virtual void SetColorWriteActive (bool abR, bool abG, bool abB, bool abA)=0
 
virtual void SetDepthWriteActive (bool abX)=0
 
virtual void SetCullActive (bool abX)=0
 
virtual void SetCullMode (eCullMode aMode)=0
 
virtual void SetDepthTestActive (bool abX)=0
 
virtual void SetDepthTestFunc (eDepthTestFunc aFunc)=0
 
virtual void SetAlphaTestActive (bool abX)=0
 
virtual void SetAlphaTestFunc (eAlphaTestFunc aFunc, float afRef)=0
 
virtual void SetStencilActive (bool abX)=0
 
virtual void SetStencil (eStencilFunc aFunc, int alRef, unsigned int aMask, eStencilOp aFailOp, eStencilOp aZFailOp, eStencilOp aZPassOp)=0
 
virtual void SetStencilTwoSide (eStencilFunc aFrontFunc, eStencilFunc aBackFunc, int alRef, unsigned int aMask, eStencilOp aFrontFailOp, eStencilOp aFrontZFailOp, eStencilOp aFrontZPassOp, eStencilOp aBackFailOp, eStencilOp aBackZFailOp, eStencilOp aBackZPassOp)=0
 
virtual void SetStencilTwoSide (bool abX)=0
 
virtual void SetScissorActive (bool abX)=0
 
virtual void SetScissorRect (const cRect2l &aRect)=0
 
virtual void SetTexture (unsigned int alUnit, iTexture *apTex)=0
 
virtual void SetActiveTextureUnit (unsigned int alUnit)=0
 
virtual void SetTextureEnv (eTextureParam aParam, int alVal)=0
 
virtual void SetTextureConstantColor (const cColor &aColor)=0
 
virtual void SetColor (const cColor &aColor)=0
 
virtual void SetBlendActive (bool abX)=0
 
virtual void SetBlendFunc (eBlendFunc aSrcFactor, eBlendFunc aDestFactor)=0
 
virtual void SetBlendFuncSeparate (eBlendFunc aSrcFactorColor, eBlendFunc aDestFactorColor, eBlendFunc aSrcFactorAlpha, eBlendFunc aDestFactorAlpha)=0
 
virtual iVertexBufferCreateVertexBuffer (tVertexFlag aFlags, eVertexBufferDrawType aDrawType, eVertexBufferUsageType aUsageType, int alReserveVtxSize=0, int alReserveIdxSize=0)=0
 
virtual void DrawRect (const cVector2f &avPos, const cVector2f &avSize, float afZ)=0
 
virtual void DrawTri (const tVertexVec &avVtx)=0
 
virtual void DrawTri (const cVertex *avVtx)=0
 
virtual void DrawQuad (const tVertexVec &avVtx)=0
 
virtual void DrawQuad (const tVertexVec &avVtx, const cColor aCol)=0
 
virtual void DrawQuad (const tVertexVec &avVtx, const float afZ)=0
 
virtual void DrawQuad (const tVertexVec &avVtx, const float afZ, const cColor &aCol)=0
 
virtual void DrawQuadMultiTex (const tVertexVec &avVtx, const tVector3fVec &avExtraUvs)=0
 
virtual void AddVertexToBatch (const cVertex &apVtx)=0
 
virtual void AddVertexToBatch (const cVertex *apVtx, const cVector3f *avTransform)=0
 
virtual void AddVertexToBatch (const cVertex *apVtx, const cMatrixf *aMtx)=0
 
virtual void AddVertexToBatch_Size2D (const cVertex *apVtx, const cVector3f *avTransform, const cColor *apCol, const float &mfW, const float &mfH)=0
 
virtual void AddVertexToBatch_Raw (const cVector3f &avPos, const cColor &aColor, const cVector3f &avTex)=0
 
virtual void AddIndexToBatch (int alIndex)=0
 
virtual void AddTexCoordToBatch (unsigned int alUnit, const cVector3f *apCoord)=0
 
virtual void SetBatchTextureUnitActive (unsigned int alUnit, bool abActive)=0
 
virtual void FlushTriBatch (tVtxBatchFlag aTypeFlags, bool abAutoClear=true)=0
 
virtual void FlushQuadBatch (tVtxBatchFlag aTypeFlags, bool abAutoClear=true)=0
 
virtual void ClearBatch ()=0
 
virtual void DrawLine (const cVector3f &avBegin, const cVector3f &avEnd, cColor aCol)=0
 
virtual void DrawBoxMaxMin (const cVector3f &avMax, const cVector3f &avMin, cColor aCol)=0
 
virtual void DrawSphere (const cVector3f &avPos, float afRadius, cColor aCol)=0
 
virtual void DrawLine2D (const cVector2f &avBegin, const cVector2f &avEnd, float afZ, cColor aCol)=0
 
virtual void DrawLineRect2D (const cRect2f &aRect, float afZ, cColor aCol)=0
 
virtual void DrawLineCircle2D (const cVector2f &avCenter, float afRadius, float afZ, cColor aCol)=0
 
virtual void DrawFilledRect2D (const cRect2f &aRect, float afZ, cColor aCol)=0
 
virtual void SetRenderTarget (iTexture *pTex)=0
 
virtual bool RenderTargetHasZBuffer ()=0
 
virtual void FlushRenderTarget ()=0
 
virtual void CopyContextToTexure (iTexture *apTex, const cVector2l &avPos, const cVector2l &avSize, const cVector2l &avTexOffset=0)=0
 
virtual void FlushRendering ()=0
 
virtual void SwapBuffers ()=0
 

Member Function Documentation

◆ Init()

virtual bool hpl::iLowLevelGraphics::Init ( int  alWidth,
int  alHeight,
int  alBpp,
int  abFullscreen,
int  alMultisampling,
const tString asWindowCaption 
)
pure virtual

Sets the video mode. Must only be called ONCE!

Parameters
alWidth
alHeight
alBpp
abFullscreen
alMultiSamplingThe amount of multisamplimg, 0 = off.
Returns

◆ GetCaps()

virtual int hpl::iLowLevelGraphics::GetCaps ( eGraphicCaps  aType) const
pure virtual

Get the capabilities of the graphics. Th return value depends on the capability

Parameters
aType
Returns

◆ ShowCursor()

virtual void hpl::iLowLevelGraphics::ShowCursor ( bool  abX)
pure virtual

Show the cursor or not. Default is false

Parameters
aX

◆ GetScreenSize()

virtual cVector2f hpl::iLowLevelGraphics::GetScreenSize ( )
pure virtual

Get Size of screen

Returns

◆ SetVirtualSize()

virtual void hpl::iLowLevelGraphics::SetVirtualSize ( cVector2f  avSize)
pure virtual

Sets the virtual screen size. Default is 0-1

Parameters
avSize

◆ SetRenderTarget()

virtual void hpl::iLowLevelGraphics::SetRenderTarget ( iTexture pTex)
pure virtual

All further drawing operations are rendered to this texture.

Parameters
pTexTexture to render to. NULL = screen (frame buffer)

◆ RenderTargetHasZBuffer()

virtual bool hpl::iLowLevelGraphics::RenderTargetHasZBuffer ( )
pure virtual

Check if the render target uses a z buffer when drawing.

Returns

◆ FlushRenderTarget()

virtual void hpl::iLowLevelGraphics::FlushRenderTarget ( )
pure virtual

Makes sure the render target is drawn to the target. Not useful for all implementations.

◆ CopyContextToTexure()

virtual void hpl::iLowLevelGraphics::CopyContextToTexure ( iTexture apTex,
const cVector2l avPos,
const cVector2l avSize,
const cVector2l avTexOffset = 0 
)
pure virtual

Copies the current frame buffer to a texture.

Parameters
apTexThe texture the framebuffer is copied to.
&avPosThe Screenpositon
&avSizeThe size of the screen.
&avTexOffsetThe position on the texture.

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