Main Page | Class List | File List | Class Members | File Members

render.cpp File Reference

#include "render.h"
#include "utilities.h"
#include "world.h"
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>

Include dependency graph for render.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void __draw ()
void __idle ()
void __reshape (int x, int y)
void setMainLoopCallback (void_func_void pIdle)
 set the main loop callback function

void setRenderCallback (void_func_void pRender)
 set the render callback function

void beginMainLoop ()
 start the main loop

void getWindowDimensions (vector2i &dim)
 get the window dimensions

void drawRectangle (const vector2f *pPos, const vector2f *pDim, const float *pLineWidth, const colour4f *pLineColour, const colour4f *pFillColour)
 draw a rectangle

void drawGrid (const vector2i &subdivs, const vector2f *pPos, const vector2f *pDim, const float *pLineWidth, const colour4f *pLineColour, const colour4f *pFillColour)
 draw a grid

void initRenderingContext (int argc, char *argv[])
 initialise renderer/window


Variables

vector2i g_windowDimensions
uInt g_terrainDisplayListId
void_func_void g_pRender
void_func_void g_pMainLoop


Function Documentation

void __draw  ) 
 

Definition at line 25 of file render.cpp.

References g_pRender.

Referenced by initRenderingContext().

void __idle  ) 
 

Definition at line 33 of file render.cpp.

References g_pMainLoop.

Referenced by initRenderingContext().

void __reshape int  x,
int  y
 

Definition at line 40 of file render.cpp.

References g_windowDimensions.

Referenced by initRenderingContext().

void beginMainLoop  ) 
 

start the main loop

Definition at line 74 of file render.cpp.

References g_pMainLoop, and g_pRender.

Referenced by main().

void drawGrid const vector2i &  subdivs,
const vector2f *  pPos,
const vector2f *  pDim,
const float *  pLineWidth,
const colour4f pLineColour,
const colour4f pFillColour
 

draw a grid

Definition at line 161 of file render.cpp.

References drawRectangle(), and colour4f::m_data.

Referenced by world::draw().

void drawRectangle const vector2f *  pPos,
const vector2f *  pDim,
const float *  pLineWidth,
const colour4f pLineColour,
const colour4f pFillColour
 

draw a rectangle

Definition at line 87 of file render.cpp.

References colour4f::m_data.

Referenced by world::draw(), and drawGrid().

void getWindowDimensions vector2i &  dim  ) 
 

get the window dimensions

Definition at line 80 of file render.cpp.

References g_windowDimensions.

void initRenderingContext int  argc,
char *  argv[]
 

initialise renderer/window

Definition at line 205 of file render.cpp.

References __draw(), __idle(), and __reshape().

Referenced by main().

void setMainLoopCallback void_func_void  pIdle  ) 
 

set the main loop callback function

Definition at line 62 of file render.cpp.

References g_pMainLoop.

Referenced by main().

void setRenderCallback void_func_void  pRender  ) 
 

set the render callback function

Definition at line 68 of file render.cpp.

References g_pRender.

Referenced by main().


Variable Documentation

void_func_void g_pMainLoop
 

Definition at line 22 of file render.cpp.

Referenced by __idle(), beginMainLoop(), and setMainLoopCallback().

void_func_void g_pRender
 

Definition at line 21 of file render.cpp.

Referenced by __draw(), beginMainLoop(), and setRenderCallback().

uInt g_terrainDisplayListId
 

Definition at line 18 of file render.cpp.

vector2i g_windowDimensions
 

Definition at line 17 of file render.cpp.

Referenced by __reshape(), and getWindowDimensions().


Generated on Sun Mar 6 22:11:27 2005 for experiment03 by doxygen 1.3.7