Guiliani  Version 2.5 revision 7293 (documentation build 13)
CGfxWrapOGLES2 Class Reference

OpenGL ES 2.x graphics wrapper implementation with FBO support. More...

#include <GfxWrapOGLES2.h>

Inheritance diagram for CGfxWrapOGLES2:

Public Member Functions

virtual void ReadTextureData (const eC_UInt &uiTexID, const eC_UInt &uiXPos, const eC_UInt &uiYPos, const eC_UInt &uiWidth, const eC_UInt &uiHeight, void *pkData)
 
- Public Member Functions inherited from CGfxWrapOGLES
virtual void CreateScreen ()
 
virtual eC_Bool Refresh (const RefreshCall_t eRefreshCallType)
 
- Public Member Functions inherited from CGfxWrapGL
virtual void Arc (const eC_Value &vX1, const eC_Value &vY1, const eC_Value &vX2, const eC_Value &vY2, const eC_Value &vStartAngle, const eC_Value &vEndAngle, const eC_Value &vRotationAngle, const eC_Bool &bFilled)
 
void BindBuffer (const eC_UInt &eType, const eC_UInt &uiBuffer)
 
void BindTexture (const eC_UInt &eType, const eC_UInt &uiTextureID)
 
void CreateScreen (const eC_UInt &uiWidth, const eC_UInt &uiHeight)
 
eC_UInt CreateTexture ()
 
void DeleteTexture (const eC_UInt &uiTextureID)
 
void DisableBlending ()
 disable blending
 
virtual eC_Bool DrawToBitmap (GUIBitmapPlaneID_t uiBitmapID)
 
virtual eC_Bool DrawToScreen ()
 
virtual void Ellipse (const eC_Value &vX1, const eC_Value &vY1, const eC_Value &vX2, const eC_Value &vY2, const eC_Bool &bFilled)
 
void EnableBlending ()
 enable blending
 
virtual void FilledRect (const eC_Value &vX1, const eC_Value &vY1, const eC_Value &vX2, const eC_Value &vY2)
 
CGUIImageDataGLGetImageData (const ImageResource_t &eImageID)
 
virtual eC_UInt GetPhysicalScreenHeight ()
 
virtual eC_UInt GetPhysicalScreenWidth ()
 
const eC_UInt GetTextureID (const ImageResource_t &eImageID)
 
eC_UInt GetVBO () const
 
virtual eC_UInt GetVirtualScreenHeight ()
 
virtual eC_UInt GetVirtualScreenWidth ()
 
virtual eC_Bool ImageExists (const ImageResource_t eID) const
 
void InitGLProcs ()
 
virtual eC_Bool InitView ()
 
eC_Bool IsFBOSupported () const
 
virtual void Line (const eC_Value &vX1, const eC_Value &vY1, const eC_Value &vX2, const eC_Value &vY2)
 
virtual void ReadTextureData (const eC_UInt &uiTexID, const eC_UInt &uiXPos, const eC_UInt &uiYPos, const eC_UInt &uiWidth, const eC_UInt &uiHeight, void *pkData)=0
 
virtual void Rect (const eC_Value &vX1, const eC_Value &vY1, const eC_Value &vX2, const eC_Value &vY2)
 
virtual void RestoreWrapperState ()
 
virtual void Ring (const eC_Value &vX1, const eC_Value &vY1, const eC_Value &vX2, const eC_Value &vY2, const eC_Value &vRingWidth, const eC_Value &vStartAngle, const eC_Value &vEndAngle, const eC_Value &vRotationAngle, const eC_Bool &bFilled)
 
void Set2DView ()
 
void Set2DView (const eC_UInt uiWidth, const eC_UInt uiHeight)
 
void SetClientStates (const eC_Bool &bVertexEnabled, const eC_Bool &bTextureCoordsEnabled)
 
virtual void SetCliprect (const CGUIRect &rkNewClipRect)
 
virtual void SetForegroundColorImpl (const eC_UByte &ubRed, const eC_UByte &ubGreen, const eC_UByte &ubBlue, const eC_UByte &ubAlpha=255)
 
virtual eC_Value SetLineWidth (const eC_Value &vWidth)
 
void SetMixTextureWithColor (const eC_Bool &bMixWithColor)
 
void SetPerspectiveProjection (const eC_Value &vFovy, const eC_Value &vAspect, const eC_Value &vNear, const eC_Value &vFar)
 
virtual void SetScreenSize (const eC_UInt &uiWidth, const eC_UInt &uiHeight)
 
void SetTexturingActive (const eC_Bool &bTexturingActive)
 
virtual void StoreWrapperState ()
 
- Public Member Functions inherited from CGfxWrap
void ForceRefresh ()
 
eC_Bool GetDoubleBufferingEnforcesFlipping ()
 
virtual eC_UInt GetNOFImages ()
 
virtual eC_UInt GetPhysicalScreenHeight ()=0
 
virtual eC_UInt GetPhysicalScreenWidth ()=0
 
CGUICommonEnums::ImageType_t GetScreenFormat () const
 
virtual eC_UInt GetScreenHorizontalPPI () const
 
virtual eC_UInt GetScreenVerticalPPI () const
 
virtual eC_UInt GetVirtualScreenHeight ()=0
 
virtual eC_UInt GetVirtualScreenWidth ()=0
 
virtual eC_UByte * GetWorkingMemory (const eC_UInt &uiSize)
 
eC_String GetWrapperName () const
 
virtual eC_Bool ImageExists (const ImageResource_t eID) const =0
 
virtual void ReleaseWorkingMemory (eC_UByte *pkMemory)
 
virtual void ResetWorkingMemory ()
 
virtual void RestoreWrapperState ()
 
void SetDoubleBufferingEnforcesFlipping (const eC_Bool bDoubleBufferingEnforcesFlipping)
 
virtual void SetFilteredBlit (const eC_Bool &bFilteredBlit)
 
void SetGfxEnv (CGfxEnv *pkGfxEnv)
 
virtual void SetOptimizedBlit (const eC_Bool &bOptimizedBlit)
 
void SetScreenFormat (const CGUICommonEnums::ImageType_t &uiScreenFormat)
 
virtual void SetScreenSize (const eC_UInt &uiWidth, const eC_UInt &uiHeight)
 
virtual void SetWindowCaption (const eC_String &kText)
 
virtual void StoreWrapperState ()
 
virtual void SyncWorkingMemory ()
 
void SetForegroundColor (const eC_UByte &ubRed, const eC_UByte &ubGreen, const eC_UByte &ubBlue, const eC_UByte &ubAlpha=255)
 
void SetForegroundColor (const eC_UInt &uiCol)
 
void UpdateGlobalAlpha (const eC_UByte &ubAlpha)
 
void SetGlobalAlpha (const eC_UByte &ubAlpha)
 
eC_UInt GetForegroundColor () const
 
eC_UByte GetGlobalAlpha () const
 
eC_UByte ApplyGlobalAlpha (const eC_UByte ubAlpha) const
 
void Line (const CGUIRect &kAbsRect)
 
void Rect (const CGUIRect &kAbsRect)
 
void FilledRect (const CGUIRect &kAbsRect)
 
void Ellipse (const CGUIRect &kAbsRect, const eC_Bool &bFilled)
 
void Arc (const CGUIRect &kAbsRect, const eC_Value &vStartAngle, const eC_Value &vEndAngle, const eC_Value &vRotationAngle, const eC_Bool &bFilled)
 
void Ring (const CGUIRect &kAbsRect, const eC_Value &vRingWidth, const eC_Value &vStartAngle, const eC_Value &vEndAngle, const eC_Value &vRotationAngle, const eC_Bool &bFilled)
 
void Text (const eC_Value &vAbsX1, const eC_Value &vAbsY1, const eC_String *const lpString)
 
virtual void RedrawGUI ()
 
virtual void ResetCliprect ()
 Resets the clipping rectangle.
 
virtual void GetCliprect (CGUIRect &AbsClipRect) const
 
void InvalidateRect (const CGUIRect &kInvalidRect)
 
void InvalidateRect (const eC_Value &vAbsX1, const eC_Value &vAbsY1, const eC_Value &vAbsX2, const eC_Value &vAbsY2)
 
const CGUIRectGetInvalidatedRect () const
 
virtual void ClearInvalidRect ()
 
void BlitImg (const ImageResource_t &eID, const eC_Value &vAbsDestX, const eC_Value &vAbsDestY)
 
void BlitImg (const CGUIImageData &kImageData, const eC_Value &vAbsDestX, const eC_Value &vAbsDestY)
 
void BlitImgExt (const ImageResource_t &eID, const eC_Value &vAbsDestX, const eC_Value &vAbsDestY, const eC_Value &vWidth, const eC_Value &vHeight, const eC_Bool &bStretch=true, const eC_UByte &ubAlpha=255)
 
void BlitImgNinePatch (const ImageResource_t &eID, const CGUIRect &kAbsRect, const CGUINinePatch &kNinePatch, const eC_UByte &ubAlpha=255)
 
void BlitImgExt (const ImageResource_t &eID, const CGUIRect &kAbsRect, const eC_Bool &bStretch=true, const eC_UByte &ubAlpha=255)
 
void BlitImgExt (const ImageResource_t &eID, const CGUIRect &kSrcAbsRect, const CGUIRect &kDstAbsRect, const eC_UByte &ubAlpha=255)
 
void BlitImgExt (const ImageResource_t &eID, const eC_UInt &uiAbsSrcX, const eC_UInt &uiAbsSrcY, const eC_UInt &uiSrcWidth, const eC_UInt &uiSrcHeight, const eC_Value &vAbsDestX, const eC_Value &vAbsDestY, const eC_Value &vDestWidth, const eC_Value &vDestHeight, const eC_UByte &ubAlpha=255, const eC_Value &vAngle=eC_FromFloat(0), const eC_Value &vRotCenterX=eC_FromFloat(0.5), const eC_Value &vRotCenterY=eC_FromFloat(0.5))
 
eC_UInt GetImgWidth (const ImageResource_t &eID) const
 
eC_UInt GetImgHeight (const ImageResource_t &eID) const
 
CGUIRect GetImgOriginRect (const ImageResource_t &eID) const
 
void SetFont (const FontResource_t &eID)
 
void SetFontSpacing (const eC_Float &fSpacing)
 
void RequiredSpace (const eC_String *const pkText, eC_Value &vWidth, eC_Value &vHeight)
 
void FittingNumChars (const eC_String *const pkText, eC_Value vWidthMax, eC_UInt &uiNumChars, const eC_Bool &bStartAtEnd=false)
 
eC_Int GetAscender () const
 
eC_Int GetDescender () const
 
eC_Int GetInternalLeading () const
 
void GetGlyphMetrics (const eC_Char cChar, CFntWrap::GlyphMetrics_t &kMetrics)
 
eC_Value GetTextXPosAdjustment (const CGUIText::HorAligned_t eHorAlignment)
 
eC_Value GetTextYPosAdjustment (const CGUIText::VerAligned_t eVerAlignment)
 
eC_Bool SetNOFFonts (const eC_UInt uiNOFFonts)
 
eC_UInt GetNOFFonts ()
 
void ChangeFont (const FontResource_t &eFontID, const eC_Char *const pcPath, const eC_UInt &uiFontSize, const CFntWrap::GUIFont_t &eFontStyle)
 
void LoadFont (const FontResource_t &eFontID)
 
void UnloadFont (const FontResource_t &eFontID)
 
virtual eC_Bool SupportCompressedFonts () const
 
virtual void LoadGlyphData (CGUIImageData *pkImageData, const eC_UInt &uiGlyphWidth, const eC_UInt &uiGlyphHeight, eC_UByte *pkGlyphBitmap)
 
virtual void UnloadGlyphData (CGUIImageData *pkImageData)
 
virtual eC_TArray< eC_UByte > * GetBitmapPlaneData (const GUIBitmapPlaneID_t &eBitmapPlaneID)
 
virtual void SetTargetLayer (const eC_UInt &uiLayerID)
 
virtual void SetRenderingOffset (const eC_Value &vOffsetX, const eC_Value &vOffsetY)
 
void GetRenderingOffset (eC_Value &vOffsetX, eC_Value &vOffsetY)
 
virtual GUIBitmapPlaneID_t CreateBitmapPlane (const CGUIObject &rkParentObject, const eC_Value &vWidth, const eC_Value &vHeight)
 
void DeleteBitmapPlane (const GUIBitmapPlaneID_t uiBitmapID)
 
void DeleteBitmapPlanes (const CGUIObject *pkObject)
 
CGUIBitmapPlaneGetBitmapPlane (const GUIBitmapPlaneID_t uiBitmapID)
 
GUIBitmapPlaneID_t GetUsedBitmapPlaneID () const
 

Static Public Member Functions

static eC_Bool CreateInstance (CGfxEnv *pkGfxEnv)
 
- Static Public Member Functions inherited from CGfxWrapGL
static eC_Bool CheckGLError (const eC_String &kCallingMethod, const eC_String &kFunction="")
 
- Static Public Member Functions inherited from CGfxWrap
static void DeleteInstance ()
 Delete the graphics wrapper instance.
 
static eC_UInt GetNextPowerOf2 (const eC_Value &vValue)
 

Protected Member Functions

 CGfxWrapOGLES2 (CGfxEnv *pkGfxEnv)
 
virtual ~CGfxWrapOGLES2 ()
 
CGUIBitmapPlaneCreateGfxDependentBitmap (GUIBitmapPlaneID_t uiNewBitmapID, const CGUIObject &rkParentObject, const eC_Value &vWidth, const eC_Value &vHeight)
 
- Protected Member Functions inherited from CGfxWrapOGLES
 CGfxWrapOGLES (CGfxEnv *pkGfxEnv)
 
virtual ~CGfxWrapOGLES ()
 
virtual eC_Bool DeInit (void)
 
virtual eC_Bool Init (void)
 
- Protected Member Functions inherited from CGfxWrapGL
 CGfxWrapGL (void)
 Constructor.
 
virtual ~CGfxWrapGL (void)
 Destructor.
 
virtual void BlitImgExtImpl (const CGUIImageData &kImageData, const eC_Value &vAbsDestX, const eC_Value &vAbsDestY)
 
virtual void BlitImgExtImpl (const ImageResource_t &eID, const eC_UInt &uiSrcX, const eC_UInt &uiSrcY, const eC_UInt &uiSrcWidth, const eC_UInt &uiSrcHeight, const eC_Value &vDestX, const eC_Value &vDestY, const eC_Value &vDestWidth, const eC_Value &vDestHeight, const eC_UByte &ubAlpha=255, const eC_Value &vAngle=eC_FromFloat(0), const eC_Value &vRotCenterX=eC_FromFloat(0.5), const eC_Value &vRotCenterY=eC_FromFloat(0.5))
 
virtual void BlitImgNinePatch (const ImageResource_t &eID, const CGUIRect &kAbsRect, const eC_UInt uiTopBorder, const eC_UInt uiBottomBorder, const eC_UInt uiLeftBorder, const eC_UInt uiRightBorder, const eC_UByte &ubAlpha)
 
void BlitNinePatchExt ()
 helper for blitting ninepatch
 
virtual CGUIBitmapPlaneCreateGfxDependentBitmap (GUIBitmapPlaneID_t uiNewBitmapID, const CGUIObject &rkParentObject, const eC_Value &vWidth, const eC_Value &vHeight)
 
void DeInit (void)
 
void DrawRect (const eC_Value &vX1, const eC_Value &vY1, const eC_Value &vX2, const eC_Value &vY2, const eC_Bool bFilled)
 
void GenerateTexture (const ImageResource_t &eImageID)
 
virtual eC_UInt GetImageSize (const ImageResource_t &eID) const
 
virtual eC_UInt GetImgHeightImpl (const ImageResource_t &eID) const
 
virtual eC_UInt GetImgWidthImpl (const ImageResource_t &eID) const
 
eC_Value GetZCorrection ()
 
void IncreaseZCorrection ()
 
void Init (void)
 
virtual void LoadImgImpl (const eC_String &psPath, const ImageResource_t &eID)
 
virtual void LoadImgImpl (void *pkMemory, const eC_UInt &uiWidth, const eC_UInt &uiHeight, const eC_UInt &eImageType, const ImageResource_t &eID)
 
virtual void RestoreBackBuffer (const eC_Value vWidth, const eC_Value vHeight)
 
void SetCliprect (const CGUIRect &rkNewClipRect, const eC_Bool &bRotate)
 
eC_Bool SetNOFImagesImpl (const eC_UInt uiNOFImages)
 
void SetScissor (const eC_Bool &bEnabled, const eC_Int &iX=0, const eC_Int &iY=0, const eC_Int &iWidth=0, const eC_Int &iHeight=0)
 
virtual void UnloadImg (const ImageResource_t &eID)
 
- Protected Member Functions inherited from CGfxWrap
 CGfxWrap ()
 Constructor.
 
virtual ~CGfxWrap (void)
 Destructor.
 
virtual void Arc (const eC_Value &vX1, const eC_Value &vY1, const eC_Value &vX2, const eC_Value &vY2, const eC_Value &vStartAngle, const eC_Value &vEndAngle, const eC_Value &vRotationAngle, const eC_Bool &bFilled)=0
 
void DeInit ()
 Deinitialization.
 
virtual void Ellipse (const eC_Value &vAbsX1, const eC_Value &vAbsY1, const eC_Value &vAbsX2, const eC_Value &vAbsY2, const eC_Bool &bFilled)=0
 
virtual void FilledRect (const eC_Value &vAbsX1, const eC_Value &vAbsY1, const eC_Value &vAbsX2, const eC_Value &vAbsY2)=0
 
virtual void Line (const eC_Value &vAbsX1, const eC_Value &vAbsY1, const eC_Value &vAbsX2, const eC_Value &vAbsY2)=0
 the following methods are protected to prevent calling them directly More...
 
virtual void Rect (const eC_Value &vAbsX1, const eC_Value &vAbsY1, const eC_Value &vAbsX2, const eC_Value &vAbsY2)=0
 
virtual void Ring (const eC_Value &vX1, const eC_Value &vY1, const eC_Value &vX2, const eC_Value &vY2, const eC_Value &vRingWidth, const eC_Value &vStartAngle, const eC_Value &vEndAngle, const eC_Value &vRotationAngle, const eC_Bool &bFilled)=0
 
virtual void SetForegroundColorImpl (const eC_UByte &ubRed, const eC_UByte &ubGreen, const eC_UByte &ubBlue, const eC_UByte &ubAlpha=255)=0
 
virtual void StartHandleDraw (const CGUIRect &crkClipRect)
 
virtual void StartRedrawGUI ()
 
virtual void EndRedrawGUI ()
 Callback which is called at the end of RedrawGUI() after all Invalidated areas were drawn and refreshed.
 
virtual void DestroyScreen ()
 Method to clean and release the screen which was created via the CreateScreen Method. More...
 
eC_Bool SetNOFImages (const eC_UInt uiNOFImages)
 
void LoadImg (const eC_String &kPath, const ImageResource_t &eID)
 
void LoadImg (void *pkMemory, const eC_UInt &uiWidth, const eC_UInt &uiHeight, const eC_UInt &eImageType, const ImageResource_t &eID)
 
virtual void RefreshImage (const ImageResource_t &eID, void *pkMemory)
 
void SetInvalidatedRect (const eC_Value &vAbsX1, const eC_Value &vAbsY1, const eC_Value &vAbsX2, const eC_Value &vAbsY2)
 
void SetInvalidatedRect (const CGUIRect &NewAbsRect)
 
void ResetInvalidatedRect ()
 Resets the invalidated rectangle.
 
CGUIBitmapPlaneGetDummyBitmap ()
 
virtual eC_Bool FinishDrawToBitmap ()
 

Additional Inherited Members

- Public Types inherited from CGfxWrap
enum  RefreshCall_t {
  SINGLE_REFRESH , FIRST_REFRESH_OF_FRAME , INTERMEDIATE_REFRESH , LAST_REFRESH_OF_FRAME ,
  FORCED_REFRESH
}
 
- Static Public Attributes inherited from CGfxWrapGL
static const eC_Value cvPixelCenterOffset
 
- Protected Attributes inherited from CGfxWrapGL
eC_TArray< CGUIImageDataGL * > m_apTextures
 used textures
 
Matrix3D_t m_avTransMat
 transition matrix
 
eC_Bool m_bFBOSupported
 < Indicates if FrameBufferObjects are supported on this machine
 
eC_UInt m_uiVertexVBO
 vertex buffer object
 
eC_Value m_vAlpha
 alpha
 
eC_Value m_vAspect
 aspect-ratio
 
eC_Value m_vBlue
 blue
 
eC_Value m_vDepthCorrection
 depth-corretion
 
eC_Value m_vFar
 far-plane
 
eC_Value m_vFovy
 fov
 
eC_Value m_vGreen
 green
 
eC_Value m_vNear
 near-plane
 
eC_Value m_vRed
 red
 
- Protected Attributes inherited from CGfxWrap
eC_Bool m_bDoubleBufferingEnforcesFlipping
 
eC_Bool m_bFilteredBlit
 if filtered blit is active
 
eC_Bool m_bInvalidationInLastFrame
 
eC_Bool m_bOptimizedBlit
 if optimized blit is active
 
CGUIRect m_kClippingRect
 
eC_Semaphore m_kGfxWrapSemaphore
 Semaphore to lock access to methods used in a multi thread context.
 
CGUIRect m_kInvalidatedRect
 
eC_TListDoubleLinked< CGUIRectm_kInvalidatedRectList
 This is the list of invalidated rectangular regions within the GUI.
 
eC_TListDoubleLinked< CGUIRectm_kLastFrameInvalidatedRectList
 This is the list of regions which have been invalidated during the LAST frame.
 
eC_String m_kWrapperName
 name of the wrapper
 
CGfxEnvm_pkGfxEnv
 pointer to the graphics-environment
 
eC_UByte m_ubAlpha
 Currently set global alpha value.
 
eC_UInt m_uiColor
 Currently set foreground color.
 
eC_UInt m_uiNOFImages
 total number of image-objects
 
eC_UInt m_uiScreenHeight
 Screen height.
 
eC_UInt m_uiScreenWidth
 Screen width.
 
eC_Value m_vGlobalAlphaFactor
 
eC_Value m_vLineWidth
 Line width in pixels.
 
eC_Value m_vRenderingOffsetX
 offset in x-direction
 
eC_Value m_vRenderingOffsetY
 offset in y-direction
 
- Static Protected Attributes inherited from CGfxWrap
static const eC_Value cvTwoPi
 constant for 2 PI
 

Detailed Description

OpenGL ES 2.x graphics wrapper implementation with FBO support.

This graphics wrapper uses OpenGL ES 2.x BitmapPlanes are realized via Framebuffer-Objects.

Constructor & Destructor Documentation

◆ CGfxWrapOGLES2()

CGfxWrapOGLES2::CGfxWrapOGLES2 ( CGfxEnv pkGfxEnv)
protected

Constructor

Parameters
pkGfxEnvenvironment to use

◆ ~CGfxWrapOGLES2()

virtual CGfxWrapOGLES2::~CGfxWrapOGLES2 ( )
protectedvirtual

Destructor

Member Function Documentation

◆ CreateGfxDependentBitmap()

CGUIBitmapPlane * CGfxWrapOGLES2::CreateGfxDependentBitmap ( GUIBitmapPlaneID_t  uiNewBitmapID,
const CGUIObject rkParentObject,
const eC_Value &  vWidth,
const eC_Value &  vHeight 
)
protectedvirtual

Method which will be called by CreateBitmap to instantiate a new Bitmap-Object. This Method needs to be implemented by every derived GfxWrapper. If a GfxWrapper does not support Bitmap-Handling, he may create an CGUIBaseBitmap

See also
Bitmap planes
Parameters
uiNewBitmapIDID of the new BitmapPlane
rkParentObjectreference to the GUIObject which will be the parent of the bitmap
vWidthwidth of the new bitmap
vHeightheight of the new bitmap
Returns
pointer to the new created BitmapObject

Reimplemented from CGfxWrapGL.

◆ CreateInstance()

static eC_Bool CGfxWrapOGLES2::CreateInstance ( CGfxEnv pkGfxEnv)
static

Singleton for creating a GfxWrapOGLES object and change the pointer in base class to this graphic wrap.

Parameters
pkGfxEnvenvironment to use
Returns
True if an instance was created by this call, otherwise False.

◆ ReadTextureData()

virtual void CGfxWrapOGLES2::ReadTextureData ( const eC_UInt &  uiTexID,
const eC_UInt &  uiXPos,
const eC_UInt &  uiYPos,
const eC_UInt &  uiWidth,
const eC_UInt &  uiHeight,
void *  pkData 
)
virtual

Read data from texture

Parameters
uiTexID
uiXPos
uiYPos
uiWidth
uiHeight
pkData

Implements CGfxWrapGL.


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