GLInterface Class Reference

This class provides access to general OpenGL settings. More...

#include <GLInterface.h>

Inherited by Level, and Menu.

Inheritance diagram for GLInterface:

Inheritance graph
[legend]
Collaboration diagram for GLInterface:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GLInterface (Window *p_window)
 Standard constructor.
virtual ~GLInterface ()
 Standard destructor.
virtual int initGL ()
 Initializes OpenGL.
int glPrint2d (double x, double y, const char *fmt,...)
 Writes text on a given line.

Public Attributes

Windowwindow
 Holds the reference to the render window.
std::deque< std::string > inputMessages
 Holds all Messages from input devices.
int base
 Holds the handle to the displaylist for the characters.

Detailed Description

This class provides access to general OpenGL settings.

Definition at line 33 of file GLInterface.h.


Constructor & Destructor Documentation

GLInterface::GLInterface ( Window p_window  ) 

Standard constructor.

Parameters:
p_window Instance of the window to display in

Definition at line 29 of file GLInterface.cpp.

References inputMessages, InputContext::registerMessagequeue(), and window.

Here is the call graph for this function:

GLInterface::~GLInterface (  )  [virtual]

Standard destructor.

Definition at line 35 of file GLInterface.cpp.

References window.


Member Function Documentation

int GLInterface::initGL (  )  [virtual]

Initializes OpenGL.

Here the characters will be generated.

Reimplemented in Level, and Menu.

Definition at line 41 of file GLInterface.cpp.

References base, Window::BuildFont(), Window::makeCurrent(), and window.

Referenced by Menu::initGL(), and Level::initGL().

Here is the call graph for this function:

int GLInterface::glPrint2d ( double  x,
double  y,
const char *  fmt,
  ... 
)

Writes text on a given line.

Usage like printf.

Parameters:
x x-coordinate for the Text.
y y-coordinate for the Text.
fmt Format string.
Returns:
0 for success.

Definition at line 73 of file GLInterface.cpp.

References base.

Referenced by Unit::render(), Interface::render(), DAEffect::render(), and Menu::writeText().


Member Data Documentation

Window* GLInterface::window

Holds the reference to the render window.

Definition at line 56 of file GLInterface.h.

Referenced by Level::checkInput(), Menu::getSelectedItem(), Menu::getString(), GLInterface(), FunctionHandler::grabScreen(), initGL(), Level::initViewCamera(), Level::pick(), Level::run(), FunctionHandler::scroll(), Level::setViewportCamera(), Level::setViewportInterface(), Menu::writeText(), and ~GLInterface().

std::deque<std::string> GLInterface::inputMessages

Holds all Messages from input devices.

Definition at line 71 of file GLInterface.h.

Referenced by Level::checkInput(), Menu::getSelectedItem(), Menu::getString(), GLInterface(), and FunctionHandler::select().

int GLInterface::base

Holds the handle to the displaylist for the characters.

Definition at line 76 of file GLInterface.h.

Referenced by glPrint2d(), and initGL().


The documentation for this class was generated from the following files:
Generated on Tue Jul 17 22:02:23 2007 for C0re by  doxygen 1.5.2