green::RenderSystem Class Reference

#include <RenderSystem.h>

Inheritance diagram for green::RenderSystem:

green::GLRenderSystem List of all members.

Public Types

enum  Graphic { SHIP, ASTEROID, BULLET }

Public Member Functions

virtual ~RenderSystem ()
virtual void Init ()
virtual void StartFrame ()
virtual void FinishFrame ()
virtual void DrawObject (Graphic object, double x, double y, double rot)
virtual void SetColor (double r, double g, double b, double a)
virtual void SetClearColor (double r, double g, double b, double a)
virtual void Reshape (int width, int height)

Protected Attributes

Color mClearColor
Color mCurrentColor

Classes

class  Color

Detailed Description

The RenderSystem class is an abstract base class for a graphics rendering class. It abstracts rendering of graphics from the rest of the engine.


Member Enumeration Documentation

enum green::RenderSystem::Graphic

TEMPORARY This enumerates different types of built-in objects to draw.


Constructor & Destructor Documentation

virtual green::RenderSystem::~RenderSystem (  )  [inline, virtual]

Default destructor declared virtual


Member Function Documentation

virtual void green::RenderSystem::Init (  )  [inline, virtual]

Initialize the RenderSystem

virtual void green::RenderSystem::StartFrame (  )  [inline, virtual]

StartFrame is called before other rendering commands are called to prepare the frame. For example, this might be implemented to clear the frame or reset graphics flags to their default values, etc..

Reimplemented in green::GLRenderSystem.

virtual void green::RenderSystem::FinishFrame (  )  [inline, virtual]

FinishFrame is called after other rendering commands are called to finish drawing the frame and perform other post processing. It also waits for async. rendering commands to finish before continuing.

Reimplemented in green::GLRenderSystem.

virtual void green::RenderSystem::DrawObject ( Graphic  object,
double  x,
double  y,
double  rot 
) [inline, virtual]

TEMPORARY DrawObject is a temporary method to draw a specific kind of object at a certain location with a certain rotation. In the future this will be replaced by more sophisticated methods.

Reimplemented in green::GLRenderSystem.

virtual void green::RenderSystem::SetColor ( double  r,
double  g,
double  b,
double  a 
) [inline, virtual]

Set the draw color.

Parameters:
r The red component of the color
g The green component of the color
b The blue component of the color
a The alpha component of the color

virtual void green::RenderSystem::SetClearColor ( double  r,
double  g,
double  b,
double  a 
) [inline, virtual]

Set the Clear color, ie the background color.

Parameters:
r The red component of the color
g The green component of the color
b The blue component of the color
a The alpha component of the color

virtual void green::RenderSystem::Reshape ( int  width,
int  height 
) [inline, virtual]

This function is called when the viewport changes

Parameters:
width The new width of the window
height The new height of the window

Reimplemented in green::GLRenderSystem.


The documentation for this class was generated from the following file:
Generated on Fri Apr 27 10:27:38 2007 for Green Engine by  doxygen 1.5.1