OpenGL graphic wrapper base class. This is the base class for all OpenGL related graphic wrappers (OpenGL and OpenGL-ES). More...
#include <GfxWrapGL.h>
Public Member Functions | |
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) |
CGUIImageDataGL * | GetImageData (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 | Polygon (eC_Value *pvPoints, const eC_UInt &uiCount, const eC_Bool &bFilled) |
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 () |
![]() | |
void | ForceRefresh () |
eC_Bool | GetDoubleBufferingEnforcesFlipping () |
eC_Bool | GetFilteredBlit () const |
virtual eC_UInt | GetNOFImages () |
eC_Bool | GetOptimizedBlit () const |
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 |
eC_String | GetWrapperName () const |
virtual eC_Bool | ImageExists (const ImageResource_t eID) const =0 |
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 () |
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 | Polygon (CGUIPoint *pkPoints, const eC_UInt &uiCount, 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 CGUIRect & | GetInvalidatedRect () 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) |
CGUIBitmapPlane & | GetBitmapPlane (const GUIBitmapPlaneID_t uiBitmapID) |
GUIBitmapPlaneID_t | GetUsedBitmapPlaneID () const |
Static Public Member Functions | |
static eC_Bool | CheckGLError (const eC_String &kCallingMethod, const eC_String &kFunction="") |
![]() | |
static void | DeleteInstance () |
Delete the graphics wrapper instance. | |
static eC_UInt | GetNextPowerOf2 (const eC_Value &vValue) |
Static Public Attributes | |
static const eC_Value | cvPixelCenterOffset |
Protected Member Functions | |
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 CGUIBitmapPlane * | CreateGfxDependentBitmap (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) |
![]() | |
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 |
void * | GetWorkingMemory (const eC_UInt &uiSize) |
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 | Polygon (eC_Value *pvPoints, const eC_UInt &uiCount, const eC_Bool &bFilled)=0 |
virtual void | Rect (const eC_Value &vAbsX1, const eC_Value &vAbsY1, const eC_Value &vAbsX2, const eC_Value &vAbsY2)=0 |
void | ReleaseWorkingMemory () |
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 eC_Bool | Refresh (const RefreshCall_t eRefreshCallType)=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. | |
CGUIBitmapPlane & | GetDummyBitmap () |
virtual eC_Bool | FinishDrawToBitmap () |
Protected Attributes | |
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 | |
![]() | |
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< CGUIRect > | m_kInvalidatedRectList |
This is the list of invalidated rectangular regions within the GUI. | |
eC_TListDoubleLinked< CGUIRect > | m_kLastFrameInvalidatedRectList |
This is the list of regions which have been invalidated during the LAST frame. | |
eC_String | m_kWrapperName |
name of the wrapper | |
CGfxEnv * | m_pkGfxEnv |
pointer to the graphics-environment | |
WorkingMemory * | m_pkWorkingMemory |
working memory | |
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 | |
Friends | |
class | CGUIBitmapPlane_GL |
Additional Inherited Members | |
![]() | |
enum | RefreshCall_t { SINGLE_REFRESH , FIRST_REFRESH_OF_FRAME , INTERMEDIATE_REFRESH , LAST_REFRESH_OF_FRAME , FORCED_REFRESH } |
![]() | |
static const eC_Value | cvTwoPi |
constant for 2 PI | |
OpenGL graphic wrapper base class. This is the base class for all OpenGL related graphic wrappers (OpenGL and OpenGL-ES).
To understand how Guiliani is handling coordinatesystems under OpenGL please
|
virtual |
Draws an arc which is completly inside the rectangle described through the rectangle the top left edge at (vAbsX1, vAbsY1) and bottom right edge at (vAbsX2, vAbsY2). The arc will be filled out if the last parameter is true
vX1 | X-coordinate of bounding rectangle's top left corner |
vY1 | Y-Coordinate of bounding rectangle's top left corner |
vX2 | X-coordinate of bounding rectangle's bottom right corner |
vY2 | Y-Coordinate of bounding rectangle's bottom right corner |
vStartAngle | start-angle |
vEndAngle | end-angle |
vRotationAngle | rotation-angle |
bFilled | Specifies whether the arc will be drawn outlined (false) or filled (true) |
Implements CGfxWrap.
void CGfxWrapGL::BindBuffer | ( | const eC_UInt & | eType, |
const eC_UInt & | uiBuffer | ||
) |
Bind buffer
eType | |
uiBuffer |
void CGfxWrapGL::BindTexture | ( | const eC_UInt & | eType, |
const eC_UInt & | uiTextureID | ||
) |
Bind texture
eType | |
uiTextureID |
|
inlineprotectedvirtual |
Blits an image. This MUST be implemented by all graphics wrappers. It is ensured that the supplied image ID is in the valid range and is not DUMMY_IMAGE. For detailed explanations, please refer to CGfxWrap::BlitImgExt
kImageData | ImageData |
vAbsDestX | Destination X position in absolute coordinates |
vAbsDestY | Destination Y position in absolute coordinates |
Implements CGfxWrap.
|
protectedvirtual |
Blits an image. This MUST be implemented by all graphics wrappers. It is ensured that the supplied image ID is in the valid range and is not DUMMY_IMAGE. For detailed explanations, please refer to CGfxWrap::BlitImgExt
eID | Identifier of the image to be blitted. |
uiAbsSrcX | X coordinate of upper left corner of the relevant area within the source image |
uiAbsSrcY | Y coordinate of upper left corner of the relevant area within the source image |
uiSrcWidth | Width of the relevant area within the source image |
uiSrcHeight | Height of the relevant area within the source image |
vAbsDestX | Destination X position in absolute coordinates |
vAbsDestY | Destination Y position in absolute coordinates |
vDestWidth | Destination width |
vDestHeight | Destination height |
ubAlpha | Degree of transparency. 0=transparent 255=opaque Default is opaque. |
vAngle | Angle in degrees by which the image will be rotated |
vRotCenterX | Rotation center X. In range of 0 to 1 (like U/V coordinates) |
vRotCenterY | Rotation center Y. In range of 0 to 1 (like U/V coordinates) |
Implements CGfxWrap.
|
protectedvirtual |
Nine-Patch blit of an image. Performs an intelligent 9-patch stretch blit of the image associated with the supplied Image Identifier. The image will be blitted to the position given by the upper left corner of the supplied rectangle and stretched to the desired width and height. To reduce visual artifacts during stretching, the image will automatically be split up into 9 parts. The four corners will be left unscaled, the four edges are each scaled in one axis, and the middle part is stretched in both axes. The two parameters uiXBorder and uiYBorder specify the width/height of the sections in pixels.
eID | Identifier of the image to be blitted. |
kAbsRect | Rectangle describing the destination position and size of the image on the screen |
uiTopBorder | Height of the topmost three sections of the Nine-patch in pixels |
uiBottomBorder | Height of the lowermost three sections of the Nine-patch in pixels |
uiLeftBorder | Width of the leftmost three sections of the Nine-patch in pixels |
uiRightBorder | Width of the rightmost three sections of the Nine-patch in pixels |
ubAlpha | Degree of transparency. 0=transparent 255=opaque. Default is opaque. |
Reimplemented from CGfxWrap.
|
static |
Checks for occurency of OpenGL Erros. All OpenGL errors (error code and text) since the last call of this function (or glGetError) are log in the Guiliani Log.
kCallingMethod | String which will be added to the Log entry. |
kFunction | name of function |
|
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
uiNewBitmapID | ID of the new BitmapPlane |
rkParentObject | reference to the GUIObject which will be the parent of the bitmap |
vWidth | width of the new bitmap |
vHeight | height of the new bitmap |
Reimplemented from CGfxWrap.
Reimplemented in CGfxWrapOGL, CGfxWrapOGLES1_1, and CGfxWrapOGLES2.
void CGfxWrapGL::CreateScreen | ( | const eC_UInt & | uiWidth, |
const eC_UInt & | uiHeight | ||
) |
create screen
uiWidth | |
uiHeight |
eC_UInt CGfxWrapGL::CreateTexture | ( | ) |
Create texture
|
protected |
Method to give the graphic library the opportunity to clean up
void CGfxWrapGL::DeleteTexture | ( | const eC_UInt & | uiTextureID | ) |
delete texture
uiTextureID |
|
protected |
Draws a rectangle
vX1 | X position of corner 1 |
vY1 | Y position of corner 1 |
vX2 | X position of corner 2 |
vY2 | Y position of corner 2 |
bFilled | Whether to draw a filled rectangle |
|
virtual |
Changes the RenderTarget to the BitmapPlane with the given ID. All successive GfxWrap draw commands will be done in the bitmap of this plane instead of within the framebuffer
uiBitmapID | ID of the BitmapPlane in which will be drawn. |
Reimplemented from CGfxWrap.
|
virtual |
Activates the Screen as active RenderTarget again
Reimplemented from CGfxWrap.
|
virtual |
Draws an ellipse which is complete inside the rectangle described through the rectangle the top left edge at (vX1, vY1) and bottom right edge at (vX2, vY2). The ellipse will be filled out if the last parameter is true
vX1 | X-Coordinate of bounding rectangle's top left corner |
vY1 | Y-Coordinate of bounding rectangle's top left corner |
vX2 | X-Coordinate of bounding rectangle's bottom right corner |
vY2 | Y-Coordinate of bounding rectangle's bottom right corner |
bFilled | Specifies whether the ellipse will be drawn outlined (false) or filled (true) |
Implements CGfxWrap.
|
virtual |
Draws a filled rectangle with the top left edge at (vX1, vY1) and bottom right edge at (vX2, vY2)
vX1 | X-Coordinate of top left corner |
vY1 | Y-Coordinate of top left corner |
vX2 | X-Coordinate of bottom right corner |
vY2 | Y-Coordinate of bottom right corner |
Implements CGfxWrap.
|
protected |
Generates a texture of matching (power of 2) size for the given image ID and copies the image into it
eImageID | ImageID for which the texture should be created. |
CGUIImageDataGL * CGfxWrapGL::GetImageData | ( | const ImageResource_t & | eImageID | ) |
Gets pointer to an image data object.
eImageID | Image data object to be returned. |
|
protectedvirtual |
Returns the amount of memory taken up by an image.
eID | ID of the image to be measured. |
Implements CGfxWrap.
|
protectedvirtual |
Gets the height of an image.
eID | Identifier of the image. |
Implements CGfxWrap.
|
protectedvirtual |
Gets the width of an image.
eID | Identifier of the image. |
Implements CGfxWrap.
|
virtual |
Returns the screen height. Will always return the physical screen height with which the GfxWrap was originally initialized. Regardless of whether the virtual screen size has been modified e.g. while drawing into a CGUIBitmapPlane.
Implements CGfxWrap.
|
virtual |
Returns the screen width. Will always return the physical screen width with which the GfxWrap was originally initialized. Regardless of whether the virtual screen size has been modified e.g. while drawing into a CGUIBitmapPlane.
Implements CGfxWrap.
const eC_UInt CGfxWrapGL::GetTextureID | ( | const ImageResource_t & | eImageID | ) |
Returns the TextureID and generates the texture if needed
eImageID | The image ID |
|
inline |
Returns the currently used vertex buffer object.
|
virtual |
Returns the screen height in pixels, may vary if DrawToBitmap is active. It will then return the active BitmapPlane's height instead.
Implements CGfxWrap.
|
virtual |
Returns the screen width in pixels, may vary if DrawToBitmap is active. It will then return the active BitmapPlane's width instead.
Implements CGfxWrap.
|
protected |
Accessing the Z-Correction for current render target. Render targets may be the screen or any BitmapPlane.
|
virtual |
Returns whether the image with the given ID currently is loaded within the Graphics Wrapper. This interface must be implemented by derived graphics wrappers.
eID | The ID to check |
Implements CGfxWrap.
|
protected |
Increases the Z-Correction for the current render target. The render target may be the screen or any BitmapPlane.
|
protected |
Method to initialize the graphic library
void CGfxWrapGL::InitGLProcs | ( | ) |
Initialize function pointers to gl-functions
|
virtual |
Helper for initialization
|
inline |
Check if FBO is supported
|
virtual |
Draws a line from (vX1, vY1) to (vX2, vY2)
vX1 | X-Coordinate of starting point |
vY1 | Y-Coordinate of starting point |
vX2 | X-Coordinate of ending point |
vY2 | Y-Coordinate of ending point |
Implements CGfxWrap.
|
protectedvirtual |
Loads an image. This loads an image from the given path and associates it with an Image-Identifier.
psPath | Complete path and filename of the image to be loaded. |
eID | ID by which the image will later be accessible. |
Implements CGfxWrap.
|
protectedvirtual |
Loads an image file from disk. Internally called by ResourceManager.
pkMemory | memory-location |
uiWidth | |
uiHeight | |
eImageType | |
eID | image-id which will be set |
Implements CGfxWrap.
|
virtual |
Draws a polygon
pvPoints | polygon points |
uiCount | number of points |
bFilled | if true the polygon is filled |
Implements CGfxWrap.
|
pure virtual |
Read data from texture
uiTexID | |
uiXPos | |
uiYPos | |
uiWidth | |
uiHeight | |
pkData |
Implemented in CGfxWrapOGL, CGfxWrapOGLES1_1, and CGfxWrapOGLES2.
|
virtual |
Draws a rectangle with the top left edge at (vX1, vY1) and bottom right edge at (vX2, vY2)
vX1 | X-Coordinate of top left corner |
vY1 | Y-Coordinate of top left corner |
vX2 | X-Coordinate of bottom right corner |
vY2 | Y-Coordinate of bottom right corner |
Implements CGfxWrap.
|
protectedvirtual |
Restores the Backbuffer of the display after it has been used for texture rendering Always begins in LOWER LEFT of screen!
vWidth | of the area to restore. |
vHeight | of the area to restore. |
|
virtual |
Restores a previously saved state for the Graphics-Wrapper. Any change in the underlying API will be purged.
Reimplemented from CGfxWrap.
|
virtual |
Draws a ring which is completly inside the rectangle described through the rectangle the top left edge at (vAbsX1, vAbsY1) and bottom right edge at (vAbsX2, vAbsY2). The ring will be filled out if the last parameter is true 0-degrees is at the mathematically correct position on the unit-circle angles are increasing in counter-clockwise direction. rotation-angle is increasing in clockwise direction, i.e. rotating by 90 degrees will result in the 0-degress being at the bottom-center
vX1 | X-coordinate of bounding rectangle's top left corner |
vY1 | Y-Coordinate of bounding rectangle's top left corner |
vX2 | X-coordinate of bounding rectangle's bottom right corner |
vY2 | Y-Coordinate of bounding rectangle's bottom right corner |
vRingWidth | width of the ring |
vStartAngle | start-angle |
vEndAngle | end-angle |
vRotationAngle | rotation-angle |
bFilled | Specifies whether the ring will be drawn outlined (false) or filled (true) |
Implements CGfxWrap.
void CGfxWrapGL::Set2DView | ( | ) |
Sets the default 2D view used by the gfx wrapper for 2D drawing operations. This method uses the dimensions returned by GetVirtualScreenWidth() and GetVirtualScreenHeight().
void CGfxWrapGL::Set2DView | ( | const eC_UInt | uiWidth, |
const eC_UInt | uiHeight | ||
) |
Sets the default 2D view used by the gfx wrapper for 2D drawing operations.
uiWidth | Width of Viewport |
uiHeight | Height of Viewport |
void CGfxWrapGL::SetClientStates | ( | const eC_Bool & | bVertexEnabled, |
const eC_Bool & | bTextureCoordsEnabled | ||
) |
set client-sates
bVertexEnabled | |
bTextureCoordsEnabled |
|
virtual |
Sets a clipping rectangle. All drawing operations will be limited to the region within the clipping rectangle. This is very useful for advanded features such as soft-scrolling. Note that the clipping rectangle is not allowed to exceed the invalidated rectangle, since this would lead to visual artifacts.
rkNewClipRect | A normalised rectangle that includes all pixels that could be drawn by the functions of the graphics wrapper. The rectangle includes the border. All pixels outside will be left untouched. |
Implements CGfxWrap.
|
protected |
This SetCliprect version is used for an anti-clockwise rotation of the GUI. E.g. in GfxWrapEAGL implementation, if the iOS device is rotated.
rkNewClipRect | A normalised rectangle that includes all pixels that could be drawn by the functions of the graphics wrapper. The rectangle includes the border. All pixels outside will be left untouched. |
bRotate | Set this true to set glScissor rotated anti-clockwise. |
|
virtual |
Sets the foreground color via r, g and b values and an alpha value
ubRed | Red intensity within a range of 0 - 255 |
ubGreen | Green intensity within a range of 0 - 255 |
ubBlue | Blue intensity within a range of 0 - 255 |
ubAlpha | alpha value |
Implements CGfxWrap.
|
virtual |
Sets the line width in pixels
vWidth | width of lines |
Reimplemented from CGfxWrap.
void CGfxWrapGL::SetMixTextureWithColor | ( | const eC_Bool & | bMixWithColor | ) |
Set color-mixing
bMixWithColor |
|
protectedvirtual |
Sets the total number of images. This is called internally by the ResourceManager when dynamically allocated image resources require the total number of images to be raised. Derived classes will have to override this method and resize their internal image-storage structures according to the new number of images which will have to be stored.
uiNOFImages | The number of images |
Reimplemented from CGfxWrap.
void CGfxWrapGL::SetPerspectiveProjection | ( | const eC_Value & | vFovy, |
const eC_Value & | vAspect, | ||
const eC_Value & | vNear, | ||
const eC_Value & | vFar | ||
) |
Applies a perspective projection matrix to current GL_PROJECTION. Old projection matrix will be overwritten. Projection matrices are used to project 3D space coordinates to a 2D screen.
OpenGL and OpenGL-ES provides projection matrix creation for parallel projection mode (glOrtho), but for perspective projection invokation of the GLU library is needed. To avoid this dependency, this implementation provides this.
The matrix is calculated the following way:
(1/w) (0) ( 0 ) ( 0 ) M = (0) (1/h) ( 0 ) ( 0 ) (0) (0) (-(near+far)/d) (-2*near*far/d) (0) (0) ( -1 ) ( 0 )
where:
h = tan(fovy/2) w = aspectRatio * h d = far - near
vFovy | Field of view in the vertical direction in DEG [0; 90]. |
vAspect | Aspect ratio of the viewport, which is width divided by height. |
vNear | Distance to front clipping plane. |
vFar | Distance to back clipping plane. |
|
protected |
Set scissor-area
bEnabled | |
iX | |
iY | |
iWidth | |
iHeight |
|
virtual |
Sets the new physical screen size.
uiWidth | New screen width. |
uiHeight | New screen height. |
Reimplemented from CGfxWrap.
void CGfxWrapGL::SetTexturingActive | ( | const eC_Bool & | bTexturingActive | ) |
Set texturing active
bTexturingActive |
|
virtual |
Saves the current active state of the Graphics-Wrapper. This might be used to manipulate the underlying API (e.g. OpenGL) without interfering with Guiliani-internal state.
Reimplemented from CGfxWrap.
|
protectedvirtual |
Unloads an image. Unloads the image associated with the supplied Image-identifier and frees the memory formerly occupied by this image.
eID | Identifier of the image to be unloaded. |
Reimplemented from CGfxWrap.
|
friend |
|
static |
Offset to get from OpenGL's coordinates to the pixel center. Note: OpenGL Pixel Coordinates do not refer to the "center" of the pixel, but to the edges between them. This means 0/0 would not point to the center of the top/left pixel, but instead to the top/left corner of this pixel Therefore, we move the coordinates to the center of the pixel by adding 0.375 pixels because of better compatibility to more graphic cards.