#include <RenderSystem.h>
Inheritance diagram for green::RenderSystem:
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 |
TEMPORARY This enumerates different types of built-in objects to draw.
virtual green::RenderSystem::~RenderSystem | ( | ) | [inline, virtual] |
Default destructor declared virtual
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.
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.
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
width | The new width of the window | |
height | The new height of the window |
Reimplemented in green::GLRenderSystem.