Drag[en]gine Game Engine
1.21
|
Graphic System. More...
#include <deGraphicSystem.h>
Public Member Functions | |
Constructors and Destructors | |
deGraphicSystem (deEngine *engine) | |
Create new graphic system linked to the given engine. More... | |
virtual | ~deGraphicSystem () |
Clean up graphic system. More... | |
Management | |
deBaseGraphicModule * | GetActiveModule () const |
Activated graphic module. More... | |
deRenderWindow * | GetRenderWindow () const |
Render window. More... | |
void | SetRenderWindow (deRenderWindow *renderWindow) |
Set render window. More... | |
void | CreateAndSetRenderWindow (int width, int height, bool fullScreen, const char *title, deImage *icon) |
Creates and sets a new render window. More... | |
deCanvasView * | GetInputOverlayCanvas () const |
Creates and sets a new hosted render window. More... | |
void | SetInputOverlayCanvas (deCanvasView *view) |
Set input system overlay canvas or NULL if not used. More... | |
deCanvasView * | GetDebugOverlayCanvas () const |
Debug overlay canvas. More... | |
void | RenderWindows () |
Render windows. More... | |
void | CreateGlobalResources () |
Create global resources. More... | |
void | LoadBillboard (deBillboard *billboard) |
Create peer object for the given billboard using the active module and assigns it. More... | |
void | LoadCanvas (deCanvas *canvas) |
Create peer object for the given canvas using the active module and assigns it. More... | |
void | LoadCamera (deCamera *camera) |
Create peer object for the given camera using the active module and assigns it. More... | |
void | LoadCaptureCanvas (deCaptureCanvas *captureCanvas) |
Create peer for capture canvas using active module and assigns it. More... | |
void | LoadComponent (deComponent *comp) |
Create peer object for the given component using the active module and assigns it. More... | |
void | LoadDebugDrawer (deDebugDrawer *debugDrawer) |
Create peer object for the given debug drawer using the active module and assigns it. More... | |
void | LoadDecal (deDecal *decal) |
Create peer object for the given decal using the active module and assigns it. More... | |
void | LoadDynamicSkin (deDynamicSkin *dynamicSkin) |
Create peer for the dynamic skin using the active module and assigns it. More... | |
void | LoadEffect (deEffect *effect) |
Create peer object for the given effect using the active module and assigns it. More... | |
void | LoadEnvMapProbe (deEnvMapProbe *envMapProbe) |
Create peer object for the given environment mapü probe using the active module and assigns it. More... | |
void | LoadFont (deFont *font) |
Create peer object for the given font using the active module and assigns it. More... | |
void | LoadHeightTerrain (deHeightTerrain *heightTerrain) |
Create peer object for the given height terrain using the active module and assigns it. More... | |
void | LoadImage (deImage *image) |
Create peer object for the given image using the active module and assigns it. More... | |
void | LoadLight (deLight *light) |
Create peer object for the given light using the active module and assigns it. More... | |
void | LoadLumimeter (deLumimeter *lumimeter) |
Create peer object for the given lumimeter using the active module and assigns it. More... | |
void | LoadModel (deModel *model) |
Create peer object for the given model using the active module and assigns it. More... | |
void | LoadOcclusionMesh (deOcclusionMesh *occmesh) |
Create peer for the occlusion mesh using the active module and assigns it. More... | |
void | LoadParticleEmitter (deParticleEmitter *emitter) |
Create peer for the particle emitter using the active module and assigns it. More... | |
void | LoadParticleEmitterInstance (deParticleEmitterInstance *instance) |
Create peer for the particle emitter instance using the active module and assigns it. More... | |
void | LoadPropField (dePropField *propField) |
Create peer object for the given prop field using the active module and assigns it. More... | |
void | LoadRenderWindow (deRenderWindow *renderWindow) |
Create peer object for the given render window using the active module and assigns it. More... | |
void | LoadSkin (deSkin *skin) |
Create peer object for the given skin using the active module and assigns it. More... | |
void | LoadSky (deSky *sky) |
Create and assign peer for sky using active module. More... | |
void | LoadSkyInstance (deSkyInstance *sky) |
Create and assign peer for sky instance using active module. More... | |
void | LoadSmokeEmitter (deSmokeEmitter *smokeEmitter) |
Create peer for the smoke emitter using the active module and assigns it. More... | |
void | LoadVideo (deVideo *video) |
Create peer for the video using the active module and assigns it. More... | |
void | LoadVideoPlayer (deVideoPlayer *videoPlayer) |
Create peer for the video player using the active module and assigns it. More... | |
void | LoadWorld (deWorld *world) |
Create peer object for the given world using the active module and assigns it. More... | |
Overloadables | |
virtual void | SetActiveModule (deLoadableModule *module) |
Set active loadable module. More... | |
virtual void | ClearPermanents () |
Clearcross references and links that could lead to memory leaks. More... | |
virtual void | PostStart () |
Carry out here actions right after the system started up. More... | |
virtual void | PreStop () |
Carry out here actions right before the system shuts down. More... | |
Public Member Functions inherited from deBaseSystem | |
deBaseSystem (deEngine *engine, const char *systemName, int requiredModuleType) | |
Create new base system linked to the given engine. More... | |
virtual | ~deBaseSystem () |
Clean up base system. More... | |
deEngine * | GetEngine () const |
Linked game engine. More... | |
deLoadableModule * | GetActiveLoadableModule () const |
Active loadable module. More... | |
bool | GetIsRunning () const |
System is running. More... | |
bool | GetHasFailed () const |
System has failed during runtime. More... | |
const decString & | GetSystemName () const |
System name. More... | |
virtual bool | CanStart () |
void | SetHasFailed (bool hasFailed) |
Set if system has failed. More... | |
virtual void | Start () |
Start system and the active loadable module. More... | |
virtual void | Stop () |
Stop system and the active loadable module. More... | |
void | CheckAndActivateFirst (deModuleSystem::eModuleTypes type) |
Check if at least one module is working and select the first one. More... | |
void | LogInfo (const char *message) |
Output information message on the console. More... | |
void | LogInfoFormat (const char *message,...) |
Output formated information message on the console. More... | |
void | LogInfoFormatUsing (const char *message, va_list args) |
Output formated information message on the console. More... | |
void | LogWarn (const char *message) |
Output warning message on the console. More... | |
void | LogWarnFormat (const char *message,...) |
Output formated warning message on the console. More... | |
void | LogWarnFormatUsing (const char *message, va_list args) |
Output formated warning message on the console. More... | |
void | LogError (const char *message) |
Output error message on the console. More... | |
void | LogErrorFormat (const char *message,...) |
Output formated error message on the console. More... | |
void | LogErrorFormatUsing (const char *message, va_list args) |
Output formated error message on the console. More... | |
void | LogException (const deException &exception) |
Output exception as error message on the console. More... | |
Graphic System.
The graphic system is a single type system providing the output functions of the engine in the graphic direction. Everything drawn to the screen including the windows required for this task are managed by the graphic system. This system provides the most peers into engine objects as it is a system requiring heavy optimizations to provide good speed also on weaker computers. A graphic system provides one special render target the Primary Render Target. This render target can not be created manually and represents the means to render to the main output location. You can create manually render targets for rendering to non visible places if you wish.
deGraphicSystem::deGraphicSystem | ( | deEngine * | engine | ) |
Create new graphic system linked to the given engine.
|
virtual |
Clean up graphic system.
|
virtual |
Clearcross references and links that could lead to memory leaks.
Do not forget to call the super function.
Reimplemented from deBaseSystem.
void deGraphicSystem::CreateAndSetRenderWindow | ( | int | width, |
int | height, | ||
bool | fullScreen, | ||
const char * | title, | ||
deImage * | icon | ||
) |
Creates and sets a new render window.
void deGraphicSystem::CreateGlobalResources | ( | ) |
Create global resources.
|
inline |
Activated graphic module.
|
inline |
Debug overlay canvas.
This overlay is for use by modules to display debug information. Each canvas added to this view is considered as one debug data block. The graphic module is at liberty to arrange the these canvas as it sees fit. For this reason modules should not expect their debug canvas to stay in a particular order. Best use a deCanvasView for each individual debug data block. Helper classes can be found in the debug directory. They provide ready made debug data blocks that can be filled with information easily.
|
inline |
Creates and sets a new hosted render window.
Input system overlay canvas or NULL if not used.
|
inline |
Render window.
void deGraphicSystem::LoadBillboard | ( | deBillboard * | billboard | ) |
Create peer object for the given billboard using the active module and assigns it.
void deGraphicSystem::LoadCamera | ( | deCamera * | camera | ) |
Create peer object for the given camera using the active module and assigns it.
void deGraphicSystem::LoadCanvas | ( | deCanvas * | canvas | ) |
Create peer object for the given canvas using the active module and assigns it.
void deGraphicSystem::LoadCaptureCanvas | ( | deCaptureCanvas * | captureCanvas | ) |
Create peer for capture canvas using active module and assigns it.
void deGraphicSystem::LoadComponent | ( | deComponent * | comp | ) |
Create peer object for the given component using the active module and assigns it.
void deGraphicSystem::LoadDebugDrawer | ( | deDebugDrawer * | debugDrawer | ) |
Create peer object for the given debug drawer using the active module and assigns it.
void deGraphicSystem::LoadDecal | ( | deDecal * | decal | ) |
Create peer object for the given decal using the active module and assigns it.
void deGraphicSystem::LoadDynamicSkin | ( | deDynamicSkin * | dynamicSkin | ) |
Create peer for the dynamic skin using the active module and assigns it.
void deGraphicSystem::LoadEffect | ( | deEffect * | effect | ) |
Create peer object for the given effect using the active module and assigns it.
void deGraphicSystem::LoadEnvMapProbe | ( | deEnvMapProbe * | envMapProbe | ) |
Create peer object for the given environment mapü probe using the active module and assigns it.
void deGraphicSystem::LoadFont | ( | deFont * | font | ) |
Create peer object for the given font using the active module and assigns it.
void deGraphicSystem::LoadHeightTerrain | ( | deHeightTerrain * | heightTerrain | ) |
Create peer object for the given height terrain using the active module and assigns it.
void deGraphicSystem::LoadImage | ( | deImage * | image | ) |
Create peer object for the given image using the active module and assigns it.
void deGraphicSystem::LoadLight | ( | deLight * | light | ) |
Create peer object for the given light using the active module and assigns it.
void deGraphicSystem::LoadLumimeter | ( | deLumimeter * | lumimeter | ) |
Create peer object for the given lumimeter using the active module and assigns it.
void deGraphicSystem::LoadModel | ( | deModel * | model | ) |
Create peer object for the given model using the active module and assigns it.
void deGraphicSystem::LoadOcclusionMesh | ( | deOcclusionMesh * | occmesh | ) |
Create peer for the occlusion mesh using the active module and assigns it.
void deGraphicSystem::LoadParticleEmitter | ( | deParticleEmitter * | emitter | ) |
Create peer for the particle emitter using the active module and assigns it.
void deGraphicSystem::LoadParticleEmitterInstance | ( | deParticleEmitterInstance * | instance | ) |
Create peer for the particle emitter instance using the active module and assigns it.
void deGraphicSystem::LoadPropField | ( | dePropField * | propField | ) |
Create peer object for the given prop field using the active module and assigns it.
void deGraphicSystem::LoadRenderWindow | ( | deRenderWindow * | renderWindow | ) |
Create peer object for the given render window using the active module and assigns it.
void deGraphicSystem::LoadSkin | ( | deSkin * | skin | ) |
Create peer object for the given skin using the active module and assigns it.
void deGraphicSystem::LoadSky | ( | deSky * | sky | ) |
Create and assign peer for sky using active module.
void deGraphicSystem::LoadSkyInstance | ( | deSkyInstance * | sky | ) |
Create and assign peer for sky instance using active module.
void deGraphicSystem::LoadSmokeEmitter | ( | deSmokeEmitter * | smokeEmitter | ) |
Create peer for the smoke emitter using the active module and assigns it.
void deGraphicSystem::LoadVideo | ( | deVideo * | video | ) |
Create peer for the video using the active module and assigns it.
void deGraphicSystem::LoadVideoPlayer | ( | deVideoPlayer * | videoPlayer | ) |
Create peer for the video player using the active module and assigns it.
void deGraphicSystem::LoadWorld | ( | deWorld * | world | ) |
Create peer object for the given world using the active module and assigns it.
|
virtual |
Carry out here actions right after the system started up.
Reimplemented from deBaseSystem.
|
virtual |
Carry out here actions right before the system shuts down.
Reimplemented from deBaseSystem.
void deGraphicSystem::RenderWindows | ( | ) |
Render windows.
Tells the graphic module changes for this frame update are finished and the existing render windows can be rendered if required. Depending on the graphic module implementation this can be a synchronous rendering in the main thread or an asynchronous rendering in a render thread. Most modules will use a render thread though. This is a synchronization point and execution will return once the graphic module has finished all necessary preparation and rendering tasks if required. After the call returns the operating system window resources are guaranteed to be valid either with the current frame changes or the image rendered since the last call to RenderWindows(). It is at the distretion of the graphic module to decide if it shows the last frame or the current frame for best performance. For this reason run RenderWindows in regular intervals.
|
virtual |
Set active loadable module.
Do not forget to call the super function.
Reimplemented from deBaseSystem.
void deGraphicSystem::SetInputOverlayCanvas | ( | deCanvasView * | view | ) |
Set input system overlay canvas or NULL if not used.
void deGraphicSystem::SetRenderWindow | ( | deRenderWindow * | renderWindow | ) |
Set render window.