IrrIMGUI  0.3.1
Classes | Functions
IrrIMGUI::Private::Driver::OpenGLHelper Namespace Reference

Helper functions for OpenGL. More...

Classes

class  COpenGLState
 Helper Class to store and restore the OpenGL state. More...
 

Functions

void deleteTextureFromMemory (CGUITexture *pGUITexture)
 Deleted a texture from memory if it uses its own memory. More...
 
ImTextureID copyTextureIDFromGUIFont (void)
 Copies the current loaded GUI Fonts into the GPU memory. More...
 
ImTextureID getTextureIDFromIrrlichtTexture (irr::video::ITexture *pTexture)
 Extracts the GPU memory ID for GUI usage from the ITexture object. More...
 
ImTextureID copyTextureIDFromIrrlichtTexture (irr::video::ITexture *pTexture)
 Copies the content of an ITexture object into the GPU memory. More...
 
ImTextureID copyTextureIDFromIrrlichtImage (irr::video::IImage *pImage)
 Copies the content of an IImage object into the GPU memory. More...
 
ImTextureID createTextureIDFromRawData (EColorFormat ColorFormat, irr::u8 *pPixelData, irr::u32 Width, irr::u32 Height)
 Creates an new texture from raw data inside the GPU memory. When the color format does not fit to the OpenGL format, it will be translated automatically. More...
 
ImTextureID createTextureInMemory (GLint OpenGLColorFormat, irr::u8 *pPixelData, irr::u32 Width, irr::u32 Height)
 Creates an new texture from raw data inside the GPU memory. For this, the Color Format must be already in an OpenGL accepted format! More...
 
void copyARGBImageToRGBA (irr::u32 *pSource, irr::u32 *pDestination, irr::u32 Width, irr::u32 Height)
 Translates an image in ARGB format (used by Irrlicht) to an image in RGBA format (used by OpenGL). More...
 
GLenum getGlEnum (GLenum const Which)
 
void restoreGLBit (GLenum const WhichBit, bool const Value)
 Restores an OpenGL Bit. More...
 

Detailed Description

Helper functions for OpenGL.

Function Documentation

void IrrIMGUI::Private::Driver::OpenGLHelper::copyARGBImageToRGBA ( irr::u32 *  pSource,
irr::u32 *  pDestination,
irr::u32  Width,
irr::u32  Height 
)

Translates an image in ARGB format (used by Irrlicht) to an image in RGBA format (used by OpenGL).

Parameters
pSourceIs a pointer to the source data array.
pDestinationIs a pointer to the destination data array.
WidthIs the number of X pixels.
HeightIs the number of Y pixels.

Definition at line 566 of file COpenGLIMGUIDriver.cpp.

Here is the caller graph for this function:

ImTextureID IrrIMGUI::Private::Driver::OpenGLHelper::copyTextureIDFromGUIFont ( void  )

Copies the current loaded GUI Fonts into the GPU memory.

Returns
Returns a GPU memory ID.

Definition at line 746 of file COpenGLIMGUIDriver.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

ImTextureID IrrIMGUI::Private::Driver::OpenGLHelper::copyTextureIDFromIrrlichtImage ( irr::video::IImage *  pImage)

Copies the content of an IImage object into the GPU memory.

Parameters
pImageIs a pointer to a IImage object.
Returns
Returns a GPU memory ID.

Definition at line 647 of file COpenGLIMGUIDriver.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

ImTextureID IrrIMGUI::Private::Driver::OpenGLHelper::copyTextureIDFromIrrlichtTexture ( irr::video::ITexture *  pTexture)

Copies the content of an ITexture object into the GPU memory.

Parameters
pTextureIs a pointer to a ITexture object.
Returns
Returns a GPU memory ID.

Definition at line 673 of file COpenGLIMGUIDriver.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

ImTextureID IrrIMGUI::Private::Driver::OpenGLHelper::createTextureIDFromRawData ( EColorFormat  ColorFormat,
irr::u8 *  pPixelData,
irr::u32  Width,
irr::u32  Height 
)

Creates an new texture from raw data inside the GPU memory. When the color format does not fit to the OpenGL format, it will be translated automatically.

Parameters
ColorFormatIs the used Color Format inside the raw data.
pPixelDataIs a pointer to the image array.
WidthIs the number of X pixels.
HeightIs the number of Y pixels.
Returns
Returns a GPU memory ID.

Definition at line 605 of file COpenGLIMGUIDriver.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

ImTextureID IrrIMGUI::Private::Driver::OpenGLHelper::createTextureInMemory ( GLint  OpenGLColorFormat,
irr::u8 *  pPixelData,
irr::u32  Width,
irr::u32  Height 
)

Creates an new texture from raw data inside the GPU memory. For this, the Color Format must be already in an OpenGL accepted format!

Parameters
OpenGLColorFormatIs the used OpenGL compatible Color Format inside the raw data.
pPixelDataIs a pointer to the image array.
WidthIs the number of X pixels.
HeightIs the number of Y pixels.
Returns
Returns a GPU memory ID.

Definition at line 582 of file COpenGLIMGUIDriver.cpp.

Here is the caller graph for this function:

void IrrIMGUI::Private::Driver::OpenGLHelper::deleteTextureFromMemory ( CGUITexture pGUITexture)

Deleted a texture from memory if it uses its own memory.

Parameters
pGUITextureIs a CGUITexture object where the GPU memory should be deleted from.

Definition at line 762 of file COpenGLIMGUIDriver.cpp.

Here is the caller graph for this function:

GLenum IrrIMGUI::Private::Driver::OpenGLHelper::getGlEnum ( GLenum const  Which)
Returns
Returns the value of an OpenGL Enum Value
Parameters
Whichis the enum where we want to know the value.

Definition at line 774 of file COpenGLIMGUIDriver.cpp.

ImTextureID IrrIMGUI::Private::Driver::OpenGLHelper::getTextureIDFromIrrlichtTexture ( irr::video::ITexture *  pTexture)

Extracts the GPU memory ID for GUI usage from the ITexture object.

Parameters
pTextureIs a pointer to a ITexture object.
Returns
Returns a GPU memory ID.

Definition at line 709 of file COpenGLIMGUIDriver.cpp.

Here is the caller graph for this function:

void IrrIMGUI::Private::Driver::OpenGLHelper::restoreGLBit ( GLenum const  WhichBit,
bool const  Value 
)

Restores an OpenGL Bit.

Parameters
WhichBitis the bit to restore.
Valuemust be true or false, whether it was set or cleared.

Definition at line 781 of file COpenGLIMGUIDriver.cpp.