IrrIMGUI  0.3.1
Protected Member Functions | Static Protected Attributes | Static Private Member Functions | Static Private Attributes | List of all members
IrrIMGUI::Private::IIMGUIDriver Class Referenceabstract

Interface for an IMGUI Driver to setup the IMGUI render system. More...

#include <IIMGUIDriver.h>

Inheritance diagram for IrrIMGUI::Private::IIMGUIDriver:
Inheritance graph
[legend]
Collaboration diagram for IrrIMGUI::Private::IIMGUIDriver:
Collaboration graph
[legend]

Public Member Functions

Destructor
virtual ~IIMGUIDriver (void)
 Destructor. More...
 
Font methods
void compileFonts (void)
 Copies the loaded Fonts into GPU memory to use them with the GUI. More...
 
Image, Texture and Font related methods
virtual IGUITexturecreateTexture (EColorFormat ColorFormat, irr::u8 *pPixelData, irr::u32 Width, irr::u32 Height)=0
 Creates a GUI texture object out of raw data. More...
 
virtual IGUITexturecreateTexture (irr::video::IImage *pImage)=0
 Creates a GUI texture object out of an Irrlicht image. More...
 
virtual IGUITexturecreateTexture (irr::video::ITexture *pTexture)=0
 Creates a GUI texture object out of an Irrlicht texture. More...
 
virtual IGUITexturecreateFontTexture (void)=0
 Creates a GUI texture out of the currently loaded fonts. More...
 
virtual void updateTexture (IGUITexture *pGUITexture, EColorFormat ColorFormat, irr::u8 *pPixelData, irr::u32 Width, irr::u32 Height)=0
 Updates a GUI texture object with raw data. More...
 
virtual void updateTexture (IGUITexture *pGUITexture, irr::video::IImage *pImage)=0
 Updates a GUI texture object with an Irrlicht image. More...
 
virtual void updateTexture (IGUITexture *pGUITexture, irr::video::ITexture *pTexture)=0
 Updates a GUI texture object with an Irrlicht texture. More...
 
virtual void updateFontTexture (IGUITexture *pGUITexture)=0
 Updates a GUI texture with the currently loaded fonts. More...
 
virtual void deleteTexture (IGUITexture *pGUITexture)=0
 Deletes an texture from graphic memory. More...
 

Static Public Member Functions

Instance handling
static IIMGUIDrivergetInstance (irr::IrrlichtDevice *pDevice)
 This method returns an instance of the driver. If no driver yet exists, it will create a new driver by it's own choice. Otherwise it will simply return the instance of the existing driver. More...
 
static bool deleteInstance (void)
 Tells the driver, that it is not needed anymore. It decided by it's own if it will delete the single instance or exist further. When the instance was deleted. More...
 
Miscellaneous methods
static irr::IrrlichtDevice * getIrrDevice (void)
 
static SIMGUISettings const & getSettings (void)
 
static void setSettings (SIMGUISettings const &rSettings)
 

Protected Member Functions

 IIMGUIDriver (irr::IrrlichtDevice *const pDevice)
 Constructor is protected to prevent an external function to create an instance of this class. More...
 
void setupMouseControl (void)
 Setups the mouse controls to fit to Irrlicht. More...
 
void setupKeyControl (void)
 Setups the keyboard controls to fit to Irrlicht. More...
 

Static Protected Attributes

static irr::u32 mTextureInstances = 0
 

Static Private Member Functions

static void updateSettings (void)
 Updated the settings of IMGUI. More...
 

Static Private Attributes

static irr::IrrlichtDevice * mpDevice = nullptr
 
static IIMGUIDrivermpInstance = nullptr
 
static irr::u32 mInstances = 0
 
static SIMGUISettings mSettings
 
static IGUITexturempFontTexture = nullptr
 

Detailed Description

Interface for an IMGUI Driver to setup the IMGUI render system.

Note
This is a singleton class, since IMGUI is a single instance system.

Definition at line 64 of file IIMGUIDriver.h.

Constructor & Destructor Documentation

IrrIMGUI::Private::IIMGUIDriver::~IIMGUIDriver ( void  )
virtual

Destructor.

Definition at line 77 of file IIMGUIDriver.cpp.

IrrIMGUI::Private::IIMGUIDriver::IIMGUIDriver ( irr::IrrlichtDevice *const  pDevice)
protected

Constructor is protected to prevent an external function to create an instance of this class.

Parameters
pDeviceis a pointer to the Irrlicht Device to use.

Definition at line 59 of file IIMGUIDriver.cpp.

Here is the call graph for this function:

Member Function Documentation

void IrrIMGUI::Private::IIMGUIDriver::compileFonts ( void  )

Copies the loaded Fonts into GPU memory to use them with the GUI.

Definition at line 243 of file IIMGUIDriver.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual IGUITexture* IrrIMGUI::Private::IIMGUIDriver::createFontTexture ( void  )
pure virtual

Creates a GUI texture out of the currently loaded fonts.

Returns
Returns an GUI texture object.

Implemented in IrrIMGUI::Private::Driver::COpenGLIMGUIDriver, and IrrIMGUI::Private::Driver::CIrrlichtIMGUIDriver.

Here is the caller graph for this function:

virtual IGUITexture* IrrIMGUI::Private::IIMGUIDriver::createTexture ( EColorFormat  ColorFormat,
irr::u8 *  pPixelData,
irr::u32  Width,
irr::u32  Height 
)
pure virtual

Creates a GUI texture object out of raw data.

Parameters
ColorFormatIs the format of the Color of every Pixel.
pPixelDataIs a pointer to the pixel array.
WidthIs the number of Pixels in X direction.
HeightIs the number of Pixels in Y direction.
Returns
Returns an GUI texture object.

Implemented in IrrIMGUI::Private::Driver::COpenGLIMGUIDriver, and IrrIMGUI::Private::Driver::CIrrlichtIMGUIDriver.

Here is the caller graph for this function:

virtual IGUITexture* IrrIMGUI::Private::IIMGUIDriver::createTexture ( irr::video::IImage *  pImage)
pure virtual

Creates a GUI texture object out of an Irrlicht image.

Parameters
pImageIs a pointer to an Irrlicht image object.
Returns
Returns an GUI texture object.

Implemented in IrrIMGUI::Private::Driver::COpenGLIMGUIDriver, and IrrIMGUI::Private::Driver::CIrrlichtIMGUIDriver.

virtual IGUITexture* IrrIMGUI::Private::IIMGUIDriver::createTexture ( irr::video::ITexture *  pTexture)
pure virtual

Creates a GUI texture object out of an Irrlicht texture.

Parameters
pTextureIs a pointer to an Irrlicht texture object.
Returns
Returns an GUI texture object.

Implemented in IrrIMGUI::Private::Driver::COpenGLIMGUIDriver, and IrrIMGUI::Private::Driver::CIrrlichtIMGUIDriver.

bool IrrIMGUI::Private::IIMGUIDriver::deleteInstance ( void  )
static

Tells the driver, that it is not needed anymore. It decided by it's own if it will delete the single instance or exist further. When the instance was deleted.

Returns
Returns true, if the instance was destroyed by this calls. If there was not instance, or if the instance has not been destroyed, it will return false.

Definition at line 132 of file IIMGUIDriver.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void IrrIMGUI::Private::IIMGUIDriver::deleteTexture ( IGUITexture pGUITexture)
pure virtual

Deletes an texture from graphic memory.

Parameters
pGUITextureIs a pointer to the texture to delete. Do not use it afterwards!

Implemented in IrrIMGUI::Private::Driver::COpenGLIMGUIDriver, and IrrIMGUI::Private::Driver::CIrrlichtIMGUIDriver.

Here is the caller graph for this function:

IIMGUIDriver * IrrIMGUI::Private::IIMGUIDriver::getInstance ( irr::IrrlichtDevice *  pDevice)
static

This method returns an instance of the driver. If no driver yet exists, it will create a new driver by it's own choice. Otherwise it will simply return the instance of the existing driver.

Parameters
pDeviceis a pointer to the Irrlicht Device to use.
Returns
Returns a pointer to the instance.

Definition at line 96 of file IIMGUIDriver.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

irr::IrrlichtDevice * IrrIMGUI::Private::IIMGUIDriver::getIrrDevice ( void  )
static
Returns
Returns a pointer to the irrlicht device.

Definition at line 163 of file IIMGUIDriver.cpp.

Here is the caller graph for this function:

SIMGUISettings const & IrrIMGUI::Private::IIMGUIDriver::getSettings ( void  )
static
Returns
Returns a constant reference to the settings that are currently used.

Definition at line 169 of file IIMGUIDriver.cpp.

Here is the caller graph for this function:

void IrrIMGUI::Private::IIMGUIDriver::setSettings ( SIMGUISettings const &  rSettings)
static
Parameters
rSettingsis a reference of the new settings to apply. The settings will applied to the global IMGUI object.

Definition at line 174 of file IIMGUIDriver.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void IrrIMGUI::Private::IIMGUIDriver::setupKeyControl ( void  )
protected

Setups the keyboard controls to fit to Irrlicht.

Definition at line 218 of file IIMGUIDriver.cpp.

Here is the caller graph for this function:

void IrrIMGUI::Private::IIMGUIDriver::setupMouseControl ( void  )
protected

Setups the mouse controls to fit to Irrlicht.

Definition at line 199 of file IIMGUIDriver.cpp.

Here is the caller graph for this function:

virtual void IrrIMGUI::Private::IIMGUIDriver::updateFontTexture ( IGUITexture pGUITexture)
pure virtual

Updates a GUI texture with the currently loaded fonts.

Parameters
pGUITextureIs a pointer to the GUI texture object.

Implemented in IrrIMGUI::Private::Driver::COpenGLIMGUIDriver, and IrrIMGUI::Private::Driver::CIrrlichtIMGUIDriver.

Here is the caller graph for this function:

void IrrIMGUI::Private::IIMGUIDriver::updateSettings ( void  )
staticprivate

Updated the settings of IMGUI.

Definition at line 182 of file IIMGUIDriver.cpp.

Here is the caller graph for this function:

virtual void IrrIMGUI::Private::IIMGUIDriver::updateTexture ( IGUITexture pGUITexture,
EColorFormat  ColorFormat,
irr::u8 *  pPixelData,
irr::u32  Width,
irr::u32  Height 
)
pure virtual

Updates a GUI texture object with raw data.

Parameters
pGUITextureIs a pointer to the GUI texture object.
ColorFormatIs the format of the Color of every Pixel.
pPixelDataIs a pointer to the pixel array.
WidthIs the number of Pixels in X direction.
HeightIs the number of Pixels in Y direction.

Implemented in IrrIMGUI::Private::Driver::COpenGLIMGUIDriver, and IrrIMGUI::Private::Driver::CIrrlichtIMGUIDriver.

Here is the caller graph for this function:

virtual void IrrIMGUI::Private::IIMGUIDriver::updateTexture ( IGUITexture pGUITexture,
irr::video::IImage *  pImage 
)
pure virtual

Updates a GUI texture object with an Irrlicht image.

Parameters
pGUITextureIs a pointer to the GUI texture object.
pImageIs a pointer to an Irrlicht image object.

Implemented in IrrIMGUI::Private::Driver::COpenGLIMGUIDriver, and IrrIMGUI::Private::Driver::CIrrlichtIMGUIDriver.

virtual void IrrIMGUI::Private::IIMGUIDriver::updateTexture ( IGUITexture pGUITexture,
irr::video::ITexture *  pTexture 
)
pure virtual

Updates a GUI texture object with an Irrlicht texture.

Parameters
pGUITextureIs a pointer to the GUI texture object.
pTextureIs a pointer to an Irrlicht image object.

Implemented in IrrIMGUI::Private::Driver::COpenGLIMGUIDriver, and IrrIMGUI::Private::Driver::CIrrlichtIMGUIDriver.

Member Data Documentation

irr::u32 IrrIMGUI::Private::IIMGUIDriver::mInstances = 0
staticprivate

Definition at line 187 of file IIMGUIDriver.h.

irr::IrrlichtDevice * IrrIMGUI::Private::IIMGUIDriver::mpDevice = nullptr
staticprivate

Definition at line 185 of file IIMGUIDriver.h.

IGUITexture * IrrIMGUI::Private::IIMGUIDriver::mpFontTexture = nullptr
staticprivate

Definition at line 189 of file IIMGUIDriver.h.

IIMGUIDriver * IrrIMGUI::Private::IIMGUIDriver::mpInstance = nullptr
staticprivate

Definition at line 186 of file IIMGUIDriver.h.

SIMGUISettings IrrIMGUI::Private::IIMGUIDriver::mSettings
staticprivate

Definition at line 188 of file IIMGUIDriver.h.

irr::u32 IrrIMGUI::Private::IIMGUIDriver::mTextureInstances = 0
staticprotected

Definition at line 179 of file IIMGUIDriver.h.


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