Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ONE::render::Renderer2D Class Reference

Inheritance diagram for ONE::render::Renderer2D:

Inheritance graph
[legend]
List of all members.

Detailed Description

interface for 2D renderers

All functions provided by this interface accept pixel coordinates.

Author:
Daniel Seibert


Public Member Functions

virtual void clearClipRegion ()=0
 clears the clip region
virtual void drawRect (const int &x, const int &y, const int &w, const int &h, const Color &c)=0
 outlines a rectangle
virtual void drawString (const string &s, const int &x, const int &y, const Font &f, const Color &c)=0
 draws a string
virtual void endDrawing ()=0
 leaves 2D drawing mode
void fillRect (const int &x, const int &y, const int &w, const int &h, const UV &tl, const UV &br, const Color &c=Color(1.0f, 1.0f, 1.0f), const unsigned int &tu=0)
 draws a textured rectangle
virtual void fillRect (const int &x, const int &y, const int &w, const int &h, const UV &p0, const UV &p1, const UV &p2, const UV &p3, const Color &c=Color(1.0f, 1.0f, 1.0f), const unsigned int &tu=0)=0
 draws a textured rectangle
virtual void fillRect (const int &x, const int &y, const int &w, const int &h, const Color &c)=0
 draws a solid single colored rectangle
virtual void popState ()=0
 returns the renderer to the last pushed state
virtual void pushState ()=0
 saves the current state
virtual void setClipRegion (const int &x, const int &y, const int &w, const int &h)=0
 sets the clipping region
virtual void setTexture (const TextureRef &tex, const unsigned int &unit=0)=0
 assigns tex to texture unit unit
virtual void startDrawing ()=0
 switches to 2D drawing mode
virtual ~Renderer2D ()


Constructor & Destructor Documentation

virtual ONE::render::Renderer2D::~Renderer2D  )  [inline, virtual]
 


Member Function Documentation

virtual void ONE::render::Renderer2D::clearClipRegion  )  [pure virtual]
 

clears the clip region

Everything will be drawn.

Implemented in ONE::render::G3DRenderer.

virtual void ONE::render::Renderer2D::drawRect const int &  x,
const int &  y,
const int &  w,
const int &  h,
const Color c
[pure virtual]
 

outlines a rectangle

Implemented in ONE::render::G3DRenderer.

virtual void ONE::render::Renderer2D::drawString const string &  s,
const int &  x,
const int &  y,
const Font f,
const Color c
[pure virtual]
 

draws a string

Parameters:
s the string that will be drawn
x the left edge of the text's bounding box
y the top edge of the text's bounding box
f the font used to draw s
c the color used to draw s

Implemented in ONE::render::G3DRenderer.

virtual void ONE::render::Renderer2D::endDrawing  )  [pure virtual]
 

leaves 2D drawing mode

Implemented in ONE::render::G3DRenderer.

void ONE::render::Renderer2D::fillRect const int &  x,
const int &  y,
const int &  w,
const int &  h,
const UV tl,
const UV br,
const Color c = Color(1.0f,1.0f,1.0f),
const unsigned int &  tu = 0
[inline]
 

draws a textured rectangle

The rectangle is textured with the last texture set by the setTexture function.

virtual void ONE::render::Renderer2D::fillRect const int &  x,
const int &  y,
const int &  w,
const int &  h,
const UV p0,
const UV p1,
const UV p2,
const UV p3,
const Color c = Color(1.0f, 1.0f, 1.0f),
const unsigned int &  tu = 0
[pure virtual]
 

draws a textured rectangle

The triangle is textured with the last texture set by the setTexture function.

Implemented in ONE::render::G3DRenderer.

virtual void ONE::render::Renderer2D::fillRect const int &  x,
const int &  y,
const int &  w,
const int &  h,
const Color c
[pure virtual]
 

draws a solid single colored rectangle

Implemented in ONE::render::G3DRenderer.

virtual void ONE::render::Renderer2D::popState  )  [pure virtual]
 

returns the renderer to the last pushed state

Implemented in ONE::render::G3DRenderer.

virtual void ONE::render::Renderer2D::pushState  )  [pure virtual]
 

saves the current state

Implemented in ONE::render::G3DRenderer.

virtual void ONE::render::Renderer2D::setClipRegion const int &  x,
const int &  y,
const int &  w,
const int &  h
[pure virtual]
 

sets the clipping region

Only objects inside the given rectangle are drawn.

Parameters:
x the first pixel column that will be accepted
y the first pixel row that will be accepted
w the number of accepted pixel columns
h the number of accepted pixel rows

Implemented in ONE::render::G3DRenderer.

virtual void ONE::render::Renderer2D::setTexture const TextureRef tex,
const unsigned int &  unit = 0
[pure virtual]
 

assigns tex to texture unit unit

Implemented in ONE::render::G3DRenderer.

virtual void ONE::render::Renderer2D::startDrawing  )  [pure virtual]
 

switches to 2D drawing mode

Implemented in ONE::render::G3DRenderer.


Generated on Wed Sep 7 19:03:27 2005 for ONEngine by  doxygen 1.4.3