GLPCDisplayList.h

Classes

GLPCDisplayListElement -- Base class for the various display list subclasses. (full description)
GLPCDisplayListEntry -- Returns a Display List Element for recording GL commands. (full description)
GLPCDisplayList -- DisplayListElement that can contain lists of other DisplayListElements. (full description)

class GLPCDisplayListElement

Interface

Public Members
virtual void call(Bool force=False, const uInt nspaces=0)
Bool enabled()const
Bool disabled()const
virtual void disable()
virtual void enable()
const char *name()const
void name(const char *)
Bool trace()const
void trace(const Bool t)
virtual void start()
virtual void stop()
uLong useCount()const
void ref()
void unref()
Protected Members
GLPCDisplayListElement(const char *name=NULL)
virtual ~GLPCDisplayListElement()
void traceCheck(uInt spaces=0, const char *str=NULL, const char *name=NULL)

Description

Member Description

virtual void call(Bool force=False, const uInt nspaces=0)

Draw element unless disabled or force is True.

Bool enabled()const
Bool disabled()const
virtual void disable()
virtual void enable()

enable/disable

const char *name()const
void name(const char *)

Each element has a name which is printed out when tracing.

Bool trace()const
void trace(const Bool t)

Enable/disable tracing.

virtual void start()

Begin recording commands. Recording is a one shot deal. After stop is called, recording can not be reenabled.

virtual void stop()

Stop display list recording. Ignored if not already recording.

uLong useCount()const

Each element is reference counted.

void ref()

void unref()

GLPCDisplayListElement(const char *name=NULL)

virtual ~GLPCDisplayListElement()

Elements self delete when the reference count goes to 0.

void traceCheck(uInt spaces=0, const char *str=NULL, const char *name=NULL)


class GLPCDisplayListEntry : public GLPCDisplayListElement

Types

enum RECORDSTATE

INITED
RECORDING
STOPPED

Interface

Public Members
GLPCDisplayListEntry::GLPCDisplayListEntry( const char *name=NULL, GLenum mode=GL_COMPILE_AND_EXECUTE)
virtual ~GLPCDisplayListEntry()
virtual void call(Bool force, const uInt spaces)
virtual void start()
virtual void stop()

Description

Synopsis

Returns a Display List Element for recording GL commands. Commands are recorded until stop is called by creating an OpenGL display list and letting OpenGL do the actual recording. Calling stop ends the list. Typically, these OpenGL lists are very short, containing just one or two commands. eg. draw a rectangle.

Member Description

enum RECORDSTATE

GLPCDisplayListEntry::GLPCDisplayListEntry( const char *name=NULL, GLenum mode=GL_COMPILE_AND_EXECUTE)

virtual ~GLPCDisplayListEntry()

virtual void call(Bool force, const uInt spaces)

virtual void start()

virtual void stop()


class GLPCDisplayList : public GLPCDisplayListElement

Types

enum

DefaultSizeIncrement = 16

Interface

GLPCDisplayList(const char *name=NULL, uInt sizeincr=GLPCDisplayList::DefaultSizeIncrement)
GLPCDisplayList(const GLPCDisplayList &list)
~GLPCDisplayList()
void add(GLPCDisplayListElement *)
virtual void call(Bool force=False, uInt spaces=0)
void translate(Float xt, Float yt, Float zt=0.0)
void translation(Float &xo, Float &yo)const
void translation(Float &xo, Float &yo, Float &zo)const
uInt sizeincrement()const
void sizeincrement(const uInt sizeincr)
Private Members
void resize()
void unrefall()

Description

Synopsis

When GLPixelCanvas::newList() is called, a GLPCDisplayList is created to hold all the GLPCDisplayListEntrys that are created. A GLPCDisplayList can also hold other GLPCDisplayLists (drawList called inside a list).

Member Description

enum

Amount by which to increment the list of display lists when it fills up.

GLPCDisplayList(const char *name=NULL, uInt sizeincr=GLPCDisplayList::DefaultSizeIncrement)

GLPCDisplayList(const GLPCDisplayList &list)

Copy a display list's list.

~GLPCDisplayList()

void add(GLPCDisplayListElement *)

Append another element to list.

virtual void call(Bool force=False, uInt spaces=0)

Run the current list.

void translate(Float xt, Float yt, Float zt=0.0)

Translate the list. Set translation values. New values are added to current.

void translation(Float &xo, Float &yo)const

Return current translation

void translation(Float &xo, Float &yo, Float &zo)const

uInt sizeincrement()const

Return/Set amount to increase id list by.

void sizeincrement(const uInt sizeincr)

void resize()

void unrefall()