PURE API 0.5
PR00F's Ultimate Rendering Engine full documentation
Loading...
Searching...
No Matches
PR00FsUltimateRenderingEngineImpl Class Reference

Detailed Description

Definition at line 30 of file PR00FsUltimateRenderingEngine.cpp.

+ Inheritance diagram for PR00FsUltimateRenderingEngineImpl:

Public Member Functions

virtual ~PR00FsUltimateRenderingEngineImpl ()
 Calls shutdown().
 
TPureUInt initialize (TPURE_RENDERER rndr, TPureUInt width, TPureUInt height, TPURE_DISPLAY_MODES dmode, TPureUInt freq, TPureInt cdepth, TPureInt zdepth, TPureInt stencil, TPureInt samples, HWND window=NULL)
 Initializes the engine.
 
TPureBool shutdown ()
 This stops the engine.
 
TPureBool isInitialized () const
 Gets the state of the engine.
 
PureScreengetScreen () const
 Get access to screen manipulation functions.
 
PureWindowgetWindow () const
 Get access to window manipulation functions.
 
PureHwInfogetHardwareInfo () const
 Get access to hardware information.
 
PureImageManagergetImageManager () const
 Get access to image handler functions.
 
PureTextureManagergetTextureManager () const
 Get access to texture handler functions.
 
PureMaterialManagergetMaterialManager () const
 Get access to material handler functions.
 
PureMesh3DManagergetMesh3DManager () const
 Get access to Mesh3D handler functions.
 
PureObject3DManagergetObject3DManager () const
 Get access to Object3D handler functions.
 
PureCameragetCamera () const
 Get access to camera handler functions.
 
PureUiManagergetUImanager () const
 Get access to user interface functions.
 
PureIRenderergetRenderer () const
 Get access to the selected renderer.
 
void setGuiDrawCallback (const std::function< void()> &cb)
 
void WriteList () const
 Invoke WriteList() of all children instances.
 
void CopyScreenToTexture (PureTexture &tex)
 Copies screen content to texture.
 
void PrintTexturesUnusedByMaterials () const
 
void PrintMaterialsUnusedByMeshes () const
 
void PrintMaterialsUnusedByObjects () const
 
void WriteStats () const
 
TPureBool getAutoWriteStatsAtShutdown () const
 Checks if invoke of WriteList() would happen at the beginning of shutdown().
 
void SetAutoWriteStatsAtShutdown (TPureBool state)
 Sets if invoke of WriteList() should happen at the beginning of shutdown().
 
- Public Member Functions inherited from PR00FsUltimateRenderingEngine
CConsole & getConsole () const
 Returns access to console preset with logger module name as this class.
 

Private Member Functions

 PR00FsUltimateRenderingEngineImpl (PGEcfgProfiles &cfgProfiles, PGEInputHandler &inputHandler)
 If true, will invoke WriteStats() at the beginning of shutdown().
 
 PR00FsUltimateRenderingEngineImpl (const PR00FsUltimateRenderingEngineImpl &)
 
PR00FsUltimateRenderingEngineImploperator= (const PR00FsUltimateRenderingEngineImpl &)
 

Private Attributes

PGEcfgProfiles & m_cfgProfiles
 
PGEInputHandler & m_inputHandler
 
PureSharedSettingsssets
 Shared settings, singleton.
 
PureWindowwnd
 Our window, where we draw to, singleton.
 
PureHwInfohwInfo
 Hardware infos, singleton.
 
PureScreenscreen
 Our screen, singleton.
 
PureImageManagerpImageMgr
 ImageManager, at least 1 instance.
 
PureTextureManagerpTextureMgr
 TextureManager, at least 1 instance.
 
PureMaterialManagerpMaterialMgr
 MaterialManager, at least 1 instance.
 
PureMesh3DManagerpMesh3DMgr
 MeshManager, at least 1 instance.
 
PureObject3DManagerpObject3DMgr
 ObjectManager, at least 1 instance.
 
PureCamerapCamera
 Camera, at least 1 instance.
 
PureUiManageruiMgr
 UI manager, singleton.
 
PureIRendererpRenderer
 Renderer, singleton.
 
TPureBool bAutoWriteStatsAtShutdown
 

Friends

class PR00FsUltimateRenderingEngine
 

Additional Inherited Members

- Static Public Member Functions inherited from PR00FsUltimateRenderingEngine
static PR00FsUltimateRenderingEnginecreateAndGet (PGEcfgProfiles &cfgProfiles, PGEInputHandler &inputHandler)
 Creates and gets the singleton implementation instance.
 
static const char * getLoggerModuleName ()
 Returns the logger module name of this class.
 

Constructor & Destructor Documentation

◆ ~PR00FsUltimateRenderingEngineImpl()

PR00FsUltimateRenderingEngineImpl::~PR00FsUltimateRenderingEngineImpl ( )
virtual

Calls shutdown().

Definition at line 107 of file PR00FsUltimateRenderingEngine.cpp.

◆ PR00FsUltimateRenderingEngineImpl() [1/2]

PR00FsUltimateRenderingEngineImpl::PR00FsUltimateRenderingEngineImpl ( PGEcfgProfiles & cfgProfiles,
PGEInputHandler & inputHandler )
explicitprivate

If true, will invoke WriteStats() at the beginning of shutdown().

NULLs members only.

Default false. NULLs members only.

Definition at line 745 of file PR00FsUltimateRenderingEngine.cpp.

◆ PR00FsUltimateRenderingEngineImpl() [2/2]

PR00FsUltimateRenderingEngineImpl::PR00FsUltimateRenderingEngineImpl ( const PR00FsUltimateRenderingEngineImpl & other)
private

Definition at line 762 of file PR00FsUltimateRenderingEngine.cpp.

Member Function Documentation

◆ CopyScreenToTexture()

void PR00FsUltimateRenderingEngineImpl::CopyScreenToTexture ( PureTexture & tex)
virtual

Copies screen content to texture.

Parameters
texThe target texture to where we save content of the screen. Width of the texture must be same as viewport width of the camera.

Implements PR00FsUltimateRenderingEngine.

Definition at line 699 of file PR00FsUltimateRenderingEngine.cpp.

◆ getAutoWriteStatsAtShutdown()

TPureBool PR00FsUltimateRenderingEngineImpl::getAutoWriteStatsAtShutdown ( ) const
virtual

Checks if invoke of WriteList() would happen at the beginning of shutdown().

Default false.

Returns
True if WriteList() would be invoked automatically at the beginning of shutdown(), false otherwise.

Implements PR00FsUltimateRenderingEngine.

Definition at line 676 of file PR00FsUltimateRenderingEngine.cpp.

◆ getCamera()

PureCamera & PR00FsUltimateRenderingEngineImpl::getCamera ( ) const
virtual

Get access to camera handler functions.

Returns
Reference to PureCamera object if engine is initialized, invalid reference otherwise.

Implements PR00FsUltimateRenderingEngine.

Definition at line 417 of file PR00FsUltimateRenderingEngine.cpp.

◆ getHardwareInfo()

PureHwInfo & PR00FsUltimateRenderingEngineImpl::getHardwareInfo ( ) const
virtual

Get access to hardware information.

Returns
Reference to PureHwInfo object if engine is initialized, invalid reference otherwise.

Implements PR00FsUltimateRenderingEngine.

Definition at line 356 of file PR00FsUltimateRenderingEngine.cpp.

◆ getImageManager()

PureImageManager & PR00FsUltimateRenderingEngineImpl::getImageManager ( ) const
virtual

Get access to image handler functions.

Returns
Reference to PureImageManager object if engine is initialized, invalid reference otherwise.

Implements PR00FsUltimateRenderingEngine.

Definition at line 367 of file PR00FsUltimateRenderingEngine.cpp.

◆ getMaterialManager()

PureMaterialManager & PR00FsUltimateRenderingEngineImpl::getMaterialManager ( ) const
virtual

Get access to material handler functions.

Returns
Reference to PureMaterialManager object if engine is initialized, invalid reference otherwise.

Implements PR00FsUltimateRenderingEngine.

Definition at line 389 of file PR00FsUltimateRenderingEngine.cpp.

◆ getMesh3DManager()

PureMesh3DManager & PR00FsUltimateRenderingEngineImpl::getMesh3DManager ( ) const
virtual

Get access to Mesh3D handler functions.

Implements PR00FsUltimateRenderingEngine.

Definition at line 395 of file PR00FsUltimateRenderingEngine.cpp.

◆ getObject3DManager()

PureObject3DManager & PR00FsUltimateRenderingEngineImpl::getObject3DManager ( ) const
virtual

Get access to Object3D handler functions.

Returns
Reference to PureObject3DManager object if engine is initialized, invalid reference otherwise.

Implements PR00FsUltimateRenderingEngine.

Definition at line 406 of file PR00FsUltimateRenderingEngine.cpp.

◆ getRenderer()

PureIRenderer * PR00FsUltimateRenderingEngineImpl::getRenderer ( ) const
virtual

Get access to the selected renderer.

Returns
Pointer to a renderer object implementing PureIRenderer interface if engine is initialized, NULL otherwise.

Implements PR00FsUltimateRenderingEngine.

Definition at line 439 of file PR00FsUltimateRenderingEngine.cpp.

◆ getScreen()

PureScreen & PR00FsUltimateRenderingEngineImpl::getScreen ( ) const
virtual

Get access to screen manipulation functions.

Returns
Reference to PureScreen object if engine is initialized, invalid reference otherwise.

Implements PR00FsUltimateRenderingEngine.

Definition at line 334 of file PR00FsUltimateRenderingEngine.cpp.

◆ getTextureManager()

PureTextureManager & PR00FsUltimateRenderingEngineImpl::getTextureManager ( ) const
virtual

Get access to texture handler functions.

Returns
Reference to PureTextureManager object if engine is initialized, invalid reference otherwise.

Implements PR00FsUltimateRenderingEngine.

Definition at line 378 of file PR00FsUltimateRenderingEngine.cpp.

◆ getUImanager()

PureUiManager & PR00FsUltimateRenderingEngineImpl::getUImanager ( ) const
virtual

Get access to user interface functions.

Returns
Reference to PureUiManager object if engine is initialized, invalid reference otherwise.

Implements PR00FsUltimateRenderingEngine.

Definition at line 428 of file PR00FsUltimateRenderingEngine.cpp.

◆ getWindow()

PureWindow & PR00FsUltimateRenderingEngineImpl::getWindow ( ) const
virtual

Get access to window manipulation functions.

Returns
Reference to PureWindow object if engine is initialized, invalid reference otherwise.

Implements PR00FsUltimateRenderingEngine.

Definition at line 345 of file PR00FsUltimateRenderingEngine.cpp.

◆ initialize()

TPureUInt PR00FsUltimateRenderingEngineImpl::initialize ( TPURE_RENDERER rndr,
TPureUInt width,
TPureUInt height,
TPURE_DISPLAY_MODES dmode,
TPureUInt freq,
TPureInt cdepth,
TPureInt zdepth,
TPureInt stencil,
TPureInt samples,
HWND window = NULL )
virtual

Initializes the engine.

Tries to set the given display mode, then initializes OpenGL.

Parameters
rndrWhich renderer to use.
widthSee initialize() of the selected renderer.
heightSee initialize() of the selected renderer.
dmodeSee initialize() of the selected renderer.
freqSee initialize() of the selected renderer.
cdepthSee initialize() of the selected renderer.
zdepthSee initialize() of the selected renderer.
stencilSee initialize() of the selected renderer.
samplesSee initialize() of the selected renderer.
windowSee initialize() of the selected renderer.
Returns
The result of the initialization. 0 on success, positive value otherwise. Currently 1 for any error.

Implements PR00FsUltimateRenderingEngine.

Definition at line 130 of file PR00FsUltimateRenderingEngine.cpp.

◆ isInitialized()

TPureBool PR00FsUltimateRenderingEngineImpl::isInitialized ( ) const
virtual

Gets the state of the engine.

Returns
True if the engine is successfully initialized, false before initialization or after shutdown.

Implements PR00FsUltimateRenderingEngine.

Definition at line 323 of file PR00FsUltimateRenderingEngine.cpp.

◆ operator=()

PR00FsUltimateRenderingEngineImpl & PR00FsUltimateRenderingEngineImpl::operator= ( const PR00FsUltimateRenderingEngineImpl & )
private

Definition at line 775 of file PR00FsUltimateRenderingEngine.cpp.

◆ PrintMaterialsUnusedByMeshes()

void PR00FsUltimateRenderingEngineImpl::PrintMaterialsUnusedByMeshes ( ) const

Definition at line 489 of file PR00FsUltimateRenderingEngine.cpp.

◆ PrintMaterialsUnusedByObjects()

void PR00FsUltimateRenderingEngineImpl::PrintMaterialsUnusedByObjects ( ) const

Definition at line 540 of file PR00FsUltimateRenderingEngine.cpp.

◆ PrintTexturesUnusedByMaterials()

void PR00FsUltimateRenderingEngineImpl::PrintTexturesUnusedByMaterials ( ) const

Definition at line 445 of file PR00FsUltimateRenderingEngine.cpp.

◆ SetAutoWriteStatsAtShutdown()

void PR00FsUltimateRenderingEngineImpl::SetAutoWriteStatsAtShutdown ( TPureBool state)
virtual

Sets if invoke of WriteList() should happen at the beginning of shutdown().

Default false.

Parameters
stateIf true WriteList() will be invoked automatically at the beginning of shutdown(), otherwise it won't be invoked.

Implements PR00FsUltimateRenderingEngine.

Definition at line 688 of file PR00FsUltimateRenderingEngine.cpp.

◆ setGuiDrawCallback()

void PR00FsUltimateRenderingEngineImpl::setGuiDrawCallback ( const std::function< void()> & cb)

◆ shutdown()

TPureBool PR00FsUltimateRenderingEngineImpl::shutdown ( )
virtual

This stops the engine.

Deletes everything created by the engine (window, textures, models, etc...). No effect before initialization. After shutdown, initialize() can be called again.

Returns
True on successful shutdown, false otherwise.

Implements PR00FsUltimateRenderingEngine.

Definition at line 253 of file PR00FsUltimateRenderingEngine.cpp.

◆ WriteList()

void PR00FsUltimateRenderingEngineImpl::WriteList ( ) const
virtual

Invoke WriteList() of all children instances.

This will give you a verbose list of all created/loaded managed and manager instances with information about resource usage.

Implements PR00FsUltimateRenderingEngine.

Definition at line 611 of file PR00FsUltimateRenderingEngine.cpp.

◆ WriteStats()

void PR00FsUltimateRenderingEngineImpl::WriteStats ( ) const

Friends And Related Symbol Documentation

◆ PR00FsUltimateRenderingEngine

friend class PR00FsUltimateRenderingEngine
friend

Definition at line 96 of file PR00FsUltimateRenderingEngine.cpp.

Member Data Documentation

◆ bAutoWriteStatsAtShutdown

TPureBool PR00FsUltimateRenderingEngineImpl::bAutoWriteStatsAtShutdown
private

Definition at line 86 of file PR00FsUltimateRenderingEngine.cpp.

◆ hwInfo

PureHwInfo& PR00FsUltimateRenderingEngineImpl::hwInfo
private

Hardware infos, singleton.

Definition at line 76 of file PR00FsUltimateRenderingEngine.cpp.

◆ m_cfgProfiles

PGEcfgProfiles& PR00FsUltimateRenderingEngineImpl::m_cfgProfiles
private

Definition at line 72 of file PR00FsUltimateRenderingEngine.cpp.

◆ m_inputHandler

PGEInputHandler& PR00FsUltimateRenderingEngineImpl::m_inputHandler
private

Definition at line 73 of file PR00FsUltimateRenderingEngine.cpp.

◆ pCamera

PureCamera* PR00FsUltimateRenderingEngineImpl::pCamera
private

Camera, at least 1 instance.

Definition at line 83 of file PR00FsUltimateRenderingEngine.cpp.

◆ pImageMgr

PureImageManager* PR00FsUltimateRenderingEngineImpl::pImageMgr
private

ImageManager, at least 1 instance.

Definition at line 78 of file PR00FsUltimateRenderingEngine.cpp.

◆ pMaterialMgr

PureMaterialManager* PR00FsUltimateRenderingEngineImpl::pMaterialMgr
private

MaterialManager, at least 1 instance.

Definition at line 80 of file PR00FsUltimateRenderingEngine.cpp.

◆ pMesh3DMgr

PureMesh3DManager* PR00FsUltimateRenderingEngineImpl::pMesh3DMgr
private

MeshManager, at least 1 instance.

Definition at line 81 of file PR00FsUltimateRenderingEngine.cpp.

◆ pObject3DMgr

PureObject3DManager* PR00FsUltimateRenderingEngineImpl::pObject3DMgr
private

ObjectManager, at least 1 instance.

Definition at line 82 of file PR00FsUltimateRenderingEngine.cpp.

◆ pRenderer

PureIRenderer* PR00FsUltimateRenderingEngineImpl::pRenderer
private

Renderer, singleton.

Definition at line 85 of file PR00FsUltimateRenderingEngine.cpp.

◆ pTextureMgr

PureTextureManager* PR00FsUltimateRenderingEngineImpl::pTextureMgr
private

TextureManager, at least 1 instance.

Definition at line 79 of file PR00FsUltimateRenderingEngine.cpp.

◆ screen

PureScreen& PR00FsUltimateRenderingEngineImpl::screen
private

Our screen, singleton.

Definition at line 77 of file PR00FsUltimateRenderingEngine.cpp.

◆ ssets

PureSharedSettings& PR00FsUltimateRenderingEngineImpl::ssets
private

Shared settings, singleton.

Definition at line 74 of file PR00FsUltimateRenderingEngine.cpp.

◆ uiMgr

PureUiManager& PR00FsUltimateRenderingEngineImpl::uiMgr
private

UI manager, singleton.

Definition at line 84 of file PR00FsUltimateRenderingEngine.cpp.

◆ wnd

PureWindow& PR00FsUltimateRenderingEngineImpl::wnd
private

Our window, where we draw to, singleton.

Definition at line 75 of file PR00FsUltimateRenderingEngine.cpp.


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