GLUTInterface Class Reference

OO interface towards GLUT. More...

#include <GLUTInterface.h>

Inheritance diagram for GLUTInterface:

Inheritance graph
[legend]
Collaboration diagram for GLUTInterface:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual int start ()
 Enter the main loop of the interface.
virtual void flush ()
 Make all drawings visible on-screen (i.e. flush any buffers).
virtual void repaint ()
 Mark the scene as needing repainting.
virtual void setIdleCallback (void(*func)(void))
 Set the idle callback function.
virtual void setPaintCallback (void(*func)(void))
 Set the paint callback function.
virtual void setKeyboardCallback (void(*func)(int key, int x, int y, bool special, bool down))
virtual void addTimerCallback (void(*func)(int value), int time_ms, int val)
 Add a timer callback.
virtual void setWindowSize (int width, int height)
 Change the size of the current window.
virtual void setFullScreen (bool fullScreen)
 Set the fullscreen mode.
virtual void setMouseEventCallback (void(*func)(int x, int y, MouseButtonType button, bool down))
virtual void setMouseMotionCallback (void(*func)(int x, int y))
 Set the mouse motion callback function.
virtual int getTime ()
 Get a timestamp that is incremented with one every ms.
virtual int getWindowWidth ()
 Get width of current window.
virtual int getWindowHeight ()
 Get height of current window.
virtual const char * name ()
 Return the name of this interface type.

Protected Member Functions

virtual int init (int argc, const char *argv[], int width, int height)

Detailed Description

OO interface towards GLUT.

Deprecated:
only SDLInterface is supported now


Member Function Documentation

virtual void GLUTInterface::addTimerCallback ( void(*)(int value)  func,
int  time_ms,
int  val 
) [virtual]

Add a timer callback.

Parameters:
func a function to call when the timer expires, NULL for none.
time_ms The time in ms until the timer fires.
val An optional value to pass to the timer function.
Note:
The timer is not repeated.

Implements Interface.

virtual void GLUTInterface::flush (  )  [virtual]

Make all drawings visible on-screen (i.e. flush any buffers).

Implements Interface.

virtual int GLUTInterface::getTime (  )  [virtual]

Get a timestamp that is incremented with one every ms.

The time at which getTime returns 0 is undefined.

Implements Interface.

virtual int GLUTInterface::getWindowHeight (  )  [virtual]

Get height of current window.

Implements Interface.

virtual int GLUTInterface::getWindowWidth (  )  [virtual]

Get width of current window.

Implements Interface.

virtual int GLUTInterface::init ( int  argc,
const char *  argv[],
int  width,
int  height 
) [protected, virtual]

Implements Interface.

virtual const char* GLUTInterface::name (  )  [inline, virtual]

Return the name of this interface type.

Reimplemented from Interface.

virtual void GLUTInterface::repaint (  )  [virtual]

Mark the scene as needing repainting.

Implements Interface.

virtual void GLUTInterface::setFullScreen ( bool  fullScreen  )  [virtual]

Set the fullscreen mode.

Parameters:
fullScreen If true switch to full screen mode, if false switch to window mode.

Implements Interface.

virtual void GLUTInterface::setIdleCallback ( void(*)(void)  func  )  [virtual]

Set the idle callback function.

Parameters:
func a function to call when no other events are pending, NULL for none.

Implements Interface.

virtual void GLUTInterface::setKeyboardCallback ( void(*)(int key, int x, int y, bool special, bool down)  func  )  [virtual]

virtual void GLUTInterface::setMouseEventCallback ( void(*)(int x, int y, MouseButtonType button, bool down)  func  )  [virtual]

virtual void GLUTInterface::setMouseMotionCallback ( void(*)(int x, int y)  func  )  [virtual]

Set the mouse motion callback function.

Parameters:
func a function to call when mouse moves, NULL for none.

Implements Interface.

virtual void GLUTInterface::setPaintCallback ( void(*)(void)  func  )  [virtual]

Set the paint callback function.

Parameters:
func a function to call to draw the scene, NULL for none.

Implements Interface.

virtual void GLUTInterface::setWindowSize ( int  width,
int  height 
) [virtual]

Change the size of the current window.

Implements Interface.

virtual int GLUTInterface::start (  )  [virtual]

Enter the main loop of the interface.

Implements Interface.


The documentation for this class was generated from the following file:
Generated on Sun Mar 11 15:33:26 2007 for MetalWarriors by  doxygen 1.4.7