deGraphicSystem Class Reference

Graphic System. More...

#include <deGraphicSystem.h>

Inheritance diagram for deGraphicSystem:
deBaseSystem

List of all members.

Public Member Functions

Constructors and Destructors
 deGraphicSystem (deEngine *engine)
 Creates a new graphic system linked to the given engine.
virtual ~deGraphicSystem ()
 Cleans up the graphic system.
Management
deBaseGraphicModuleGetActiveModule () const
 Retrieves the activated graphic module.
deRenderWindowGetRenderWindow () const
 Retrieves the render window.
void SetRenderWindow (deRenderWindow *renderWindow)
 Sets the render window.
void CreateAndSetRenderWindow (int width, int height, bool fullScreen, const char *title)
 Creates and sets a new render window.
Runtime Functions

Run-Time functions can only be called if the graphic system is running.

Otherwise those functions cause an exception.

void BeginFrame ()
 Starts rendering a new frame.
void EndFrame ()
 Ends rendering a frame and displays the buffer just used for rendering.
void LoadModel (deModel *model)
 Creates the peer object for the given model using the active module and assigns it.
void LoadSkin (deSkin *skin)
 Creates the peer object for the given skin using the active module and assigns it.
void LoadComponent (deComponent *comp)
 Creates the peer object for the given component using the active module and assigns it.
void LoadFont (deFont *font)
 Creates the peer object for the given font using the active module and assigns it.
void LoadImage (deImage *image)
 Creates the peer object for the given image using the active module and assigns it.
void LoadLight (deLight *light)
 Creates the peer object for the given light using the active module and assigns it.
void LoadSky (deSky *sky)
 Creates the peer object for the given sky using the active module and assigns it.
void LoadWorld (deWorld *world)
 Creates the peer object for the given world using the active module and assigns it.
void LoadEffect (deEffect *effect)
 Creates the peer object for the given effect using the active module and assigns it.
void LoadDebugDrawer (deDebugDrawer *debugDrawer)
 Creates the peer object for the given debug drawer using the active module and assigns it.
void LoadRenderTarget (deRenderTarget *target)
 Creates the peer object for the given render target using the active module and assigns it.
void LoadRenderWindow (deRenderWindow *renderWindow)
 Creates the peer object for the given render window using the active module and assigns it.
void LoadGraphicContext (deGraphicContext *context)
 Creates the peer object for the given graphic context using the active module and assigns it.
void LoadBillboard (deBillboard *billboard)
 Creates the peer object for the given billboard using the active module and assigns it.
void LoadDecal (deDecal *decal)
 Creates the peer object for the given decal using the active module and assigns it.
void LoadCamera (deCamera *camera)
 Creates the peer object for the given camera using the active module and assigns it.
void LoadLumimeter (deLumimeter *lumimeter)
 Creates the peer object for the given lumimeter using the active module and assigns it.
void LoadHeightTerrain (deHeightTerrain *heightTerrain)
 Creates the peer object for the given height terrain using the active module and assigns it.
void LoadPropField (dePropField *propField)
 Creates the peer object for the given prop field using the active module and assigns it.
void LoadParticleEmitter (deParticleEmitter *emitter)
 Creates the peer for the particle emitter using the active module and assigns it.
void LoadSmokeEmitter (deSmokeEmitter *smokeEmitter)
 Creates the peer for the smoke emitter using the active module and assigns it.
void LoadOccluder (deOccluder *occluder)
 Creates the peer for the occluder using the active module and assigns it.
void LoadDynamicSkin (deDynamicSkin *dynamicSkin)
 Creates the peer for the dynamic skin using the active module and assigns it.
void LoadVideo (deVideo *video)
 Creates the peer for the video using the active module and assigns it.
void LoadVideoPlayer (deVideoPlayer *videoPlayer)
 Creates the peer for the video player using the active module and assigns it.
void LoadPortalSystem (dePortalSystem *portalSystem)
 Creates the peer for the portal system using the active module and assigns it.
Overloadables
virtual void SetActiveModule (deLoadableModule *module)
 Sets the active loadable module.
virtual void ClearPermanents ()
 Clears cross references and links that could lead to memory leaks.
virtual void PostStart ()
 Carry out here actions right after the system started up.
virtual void PreStop ()
 Carry out here actions right before the system shuts down.
Notifications
virtual void TexturePropertyMapChanged ()
 Texture property map changed.

Detailed Description

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.

Note:
Currently the render system expects a buffer swapping to be done for the output object. This is true in the case of games but for other applications using the engine in headless mode this is overkill. Furthermore for a pure GUI intro menu without 3d graphics used buffer swapping is overkill too. An possible solution is to allow setting a buffer-switching flag. If the flag is not set always the same buffer is used and drawing takes place immediatly the way operating systems handle drawing. With buffer switching activated each time you finish a frame the the buffers are switched. In the later scenario you have to draw the entire screen each time wheras in the former you only have to render if needed.
Currently the graphic system manages render targets instead of a separate render target manager. This is a bad situation and will be changed in the future. The render target becomes an own resource type and a manager.
Author:
Plüss Roland
Version:
1.0
Date:
2008

Constructor & Destructor Documentation

deGraphicSystem::deGraphicSystem ( deEngine engine )

Creates a new graphic system linked to the given engine.

virtual deGraphicSystem::~deGraphicSystem (  ) [virtual]

Cleans up the graphic system.


Member Function Documentation

void deGraphicSystem::BeginFrame (  )

Starts rendering a new frame.

virtual void deGraphicSystem::ClearPermanents (  ) [virtual]

Clears cross 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 
)

Creates and sets a new render window.

void deGraphicSystem::EndFrame (  )

Ends rendering a frame and displays the buffer just used for rendering.

deBaseGraphicModule* deGraphicSystem::GetActiveModule (  ) const [inline]

Retrieves the activated graphic module.

deRenderWindow* deGraphicSystem::GetRenderWindow (  ) const [inline]

Retrieves the render window.

void deGraphicSystem::LoadBillboard ( deBillboard billboard )

Creates the peer object for the given billboard using the active module and assigns it.

void deGraphicSystem::LoadCamera ( deCamera camera )

Creates the peer object for the given camera using the active module and assigns it.

void deGraphicSystem::LoadComponent ( deComponent comp )

Creates the peer object for the given component using the active module and assigns it.

void deGraphicSystem::LoadDebugDrawer ( deDebugDrawer debugDrawer )

Creates the peer object for the given debug drawer using the active module and assigns it.

void deGraphicSystem::LoadDecal ( deDecal decal )

Creates the peer object for the given decal using the active module and assigns it.

void deGraphicSystem::LoadDynamicSkin ( deDynamicSkin dynamicSkin )

Creates the peer for the dynamic skin using the active module and assigns it.

void deGraphicSystem::LoadEffect ( deEffect effect )

Creates the peer object for the given effect using the active module and assigns it.

void deGraphicSystem::LoadFont ( deFont font )

Creates the peer object for the given font using the active module and assigns it.

void deGraphicSystem::LoadGraphicContext ( deGraphicContext context )

Creates the peer object for the given graphic context using the active module and assigns it.

void deGraphicSystem::LoadHeightTerrain ( deHeightTerrain heightTerrain )

Creates the peer object for the given height terrain using the active module and assigns it.

void deGraphicSystem::LoadImage ( deImage image )

Creates the peer object for the given image using the active module and assigns it.

void deGraphicSystem::LoadLight ( deLight light )

Creates the peer object for the given light using the active module and assigns it.

void deGraphicSystem::LoadLumimeter ( deLumimeter lumimeter )

Creates the peer object for the given lumimeter using the active module and assigns it.

void deGraphicSystem::LoadModel ( deModel model )

Creates the peer object for the given model using the active module and assigns it.

void deGraphicSystem::LoadOccluder ( deOccluder occluder )

Creates the peer for the occluder using the active module and assigns it.

void deGraphicSystem::LoadParticleEmitter ( deParticleEmitter emitter )

Creates the peer for the particle emitter using the active module and assigns it.

void deGraphicSystem::LoadPortalSystem ( dePortalSystem portalSystem )

Creates the peer for the portal system using the active module and assigns it.

void deGraphicSystem::LoadPropField ( dePropField propField )

Creates the peer object for the given prop field using the active module and assigns it.

void deGraphicSystem::LoadRenderTarget ( deRenderTarget target )

Creates the peer object for the given render target using the active module and assigns it.

void deGraphicSystem::LoadRenderWindow ( deRenderWindow renderWindow )

Creates the peer object for the given render window using the active module and assigns it.

void deGraphicSystem::LoadSkin ( deSkin skin )

Creates the peer object for the given skin using the active module and assigns it.

void deGraphicSystem::LoadSky ( deSky sky )

Creates the peer object for the given sky using the active module and assigns it.

void deGraphicSystem::LoadSmokeEmitter ( deSmokeEmitter smokeEmitter )

Creates the peer for the smoke emitter using the active module and assigns it.

void deGraphicSystem::LoadVideo ( deVideo video )

Creates the peer for the video using the active module and assigns it.

void deGraphicSystem::LoadVideoPlayer ( deVideoPlayer videoPlayer )

Creates the peer for the video player using the active module and assigns it.

void deGraphicSystem::LoadWorld ( deWorld world )

Creates the peer object for the given world using the active module and assigns it.

virtual void deGraphicSystem::PostStart (  ) [virtual]

Carry out here actions right after the system started up.

Reimplemented from deBaseSystem.

virtual void deGraphicSystem::PreStop (  ) [virtual]

Carry out here actions right before the system shuts down.

Reimplemented from deBaseSystem.

virtual void deGraphicSystem::SetActiveModule ( deLoadableModule module ) [virtual]

Sets the active loadable module.

Do not forget to call the super function.

Reimplemented from deBaseSystem.

void deGraphicSystem::SetRenderWindow ( deRenderWindow renderWindow )

Sets the render window.

virtual void deGraphicSystem::TexturePropertyMapChanged (  ) [virtual]

Texture property map changed.

Reimplemented from deBaseSystem.


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