Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

VIEW::GLDisplayList Class Reference
[Renderer]

GLDisplayList class. More...

#include <glDisplayList.h>

List of all members.

Public Types

Type Definitions.
typedef unsigned long GLList
 GLList definition.

Public Member Functions

Constructors
 GLDisplayList () throw ()
 Default Constructor.
Destructors
virtual ~GLDisplayList () throw ()
 Destructor.
virtual void clear () throw ()
 Explicit default initialization.
Accessors: inspectors and mutators
void startDefinition () throw (NestedDisplayList, NoDisplayListAvailable, DisplayListRedeclaration)
 Begin the display list.
void endDefinition () throw ()
 End the display list.
void draw () throw ()
 Draw the display list.
void useCompileMode () throw ()
 Compile mode switch.
void useCompileAndExecuteMode () throw ()
 Compile and Execute mode switch.
Predicates
bool isCompileMode () const throw ()
 Compile mode test.
bool isCompileAndExecuteMode () const throw ()
 Compile and Execute mode test.
debuggers and diagnostics
virtual bool isValid () const throw ()
 Internal state and consistency self-validation.
virtual void dump (std::ostream &s=std::cout, Size depth=0) const throw ()
 Internal value dump.

Static Public Attributes

Predefined static values.
const GLList DISPLAYLIST_NOT_DEFINED
 Empty display list.


Detailed Description

GLDisplayList class.

The class GLDisplayList is a container for graphical objects. Graphical objects can be drawn directly to the screen or they can be stored in a display list for faster drawing afterwards. This class provides the means for storing graphical objects in a own display list. This class is a wrapper class for the OpenGL display list mechanims. It defines some useful methods for easy creation of a display list and handles errors that can occur when using display lists. See the OpenGL defintion of display lists for further information concerning display lists.


Member Typedef Documentation

typedef unsigned long VIEW::GLDisplayList::GLList
 

GLList definition.

A display list is stored as a number. For convienence a type is declared that represents such a display list.


Constructor & Destructor Documentation

VIEW::GLDisplayList::GLDisplayList  )  throw ()
 

Default Constructor.

There is no copy constructor because the OpenGL display lists cannot be copied. The state of this glDisplayList is set to:

  • display list empty
  • use compile mode instead of compile and execute mode

virtual VIEW::GLDisplayList::~GLDisplayList  )  throw () [virtual]
 

Destructor.

Calls clear()


Member Function Documentation

virtual void VIEW::GLDisplayList::clear  )  throw () [virtual]
 

Explicit default initialization.

Resets the mode of this glDisplayList to compile.

void VIEW::GLDisplayList::draw  )  throw ()
 

Draw the display list.

If this method is called the graphical representation of this will be drawn. Precondition: this glDisplayList has a graphical representation defined before by startDefinition and endDefinition.

See also:
startDefinition

endDefinition

virtual void VIEW::GLDisplayList::dump std::ostream &  s = std::cout,
Size  depth = 0
const throw () [virtual]
 

Internal value dump.

Dump the current state to the output ostream s with dumping depth depth.

Parameters:
s output stream where to output the state of this glDisplayList
depth the dumping depth

void VIEW::GLDisplayList::endDefinition  )  throw ()
 

End the display list.

This method is the end command for a display list definition.

See also:
startDefinition

bool VIEW::GLDisplayList::isCompileAndExecuteMode  )  const throw ()
 

Compile and Execute mode test.

Tests if this glDisplayList is set to compile and execute.

See also:
useCompileAndExecuteMode

bool VIEW::GLDisplayList::isCompileMode  )  const throw ()
 

Compile mode test.

Tests if this glDisplayList is set to compile only.

See also:
useCompileMode

virtual bool VIEW::GLDisplayList::isValid  )  const throw () [virtual]
 

Internal state and consistency self-validation.

A glDisplayList is valid if a display list is already defined.

void VIEW::GLDisplayList::startDefinition  )  throw (NestedDisplayList, NoDisplayListAvailable, DisplayListRedeclaration)
 

Begin the display list.

If graphical objects should be put into a display list they must be put between a startDefinition and endDefinition command. This method indicates the start of a display list. Every object drawn after this method will be compiled into this glDisplayList.

Exceptions:
NestedDisplayList thrown whenever a nested display list definition is tried.
NoDisplayListAvailable thrown whenever no memory for the display list is available.
DisplayListRedeclaration thrown whenever this glDisplayList is tried to redefine before destroy is called.
See also:
endDefinition

void VIEW::GLDisplayList::useCompileAndExecuteMode  )  throw ()
 

Compile and Execute mode switch.

Before the definition of the graphical objects between startDefinition and endDefinition the compile and execute mode can be set. If this method is used this glDisplayList will compile the used objects into a display list and simultaneously execute their graphical representation.

See also:
useCompileMode

startDefinition

endDefinition

void VIEW::GLDisplayList::useCompileMode  )  throw ()
 

Compile mode switch.

Before the definition of the graphical objects between startDefinition and endDefinition the compile mode can be set. If this method is used this glDisplayList will only compile the graphical representation of the used objects into a display list.

See also:
useCompileAndExecuteMode

startDefinition

endDefinition


Member Data Documentation

const GLList VIEW::GLDisplayList::DISPLAYLIST_NOT_DEFINED [static]
 

Empty display list.

A predefined value for an empty display list is defined as DISPLAYLIST_NOT_DEFINED.