pfDrawAction(3pf) OpenGL Performer 3.2.2 libpfx C++ Reference Pages
NAMEpfDrawAction - Simplest draw action used by pfViewer classes.
FUNCTION SPECIFICATION
#include <Performer/pfx/pfDrawAction.h>
pfDrawAction::pfDrawAction();
static pfType* pfDrawAction::getClassType(void);
virtual void pfDrawAction::preDraw(pfChannel *, pfViewer *);
virtual void pfDrawAction::postDraw(pfChannel *, pfViewer *);
PARENT CLASS FUNCTIONS
The OpenGL Performer class pfDrawAction is derived from the parent class
pfObject, so each of these member functions of class pfObject are also
directly usable with objects of class pfDrawAction. This is also true
for ancestor classes of class pfObject.
void* pfObject::operator new(size_t);
void* pfObject::operator new(size_t, pfFluxMemory *fmem);
void pfObject::setUserData(void *data);
void pfObject::setUserData(int slot, void *data);
void* pfObject::getUserData(pfObject *obj);
void* pfObject::getUserData(pfObject *obj, int slot);
int pfObject::getNumUserData();
Since the class pfObject is itself derived from the parent class
pfMemory, objects of class pfDrawAction can also be used with these
functions designed for objects of class pfMemory.
void* pfMemory::getData(const void *ptr);
pfType * pfMemory::getType();
int pfMemory::isOfType(pfType *type);
int pfMemory::isExactType(pfType *type);
const char * pfMemory::getTypeName();
int pfMemory::copy(pfMemory *src);
int pfMemory::compare(const pfMemory *mem);
void pfMemory::print(uint which, uint verbose, char *prefix,
FILE *file);
int pfMemory::getArena(void *ptr);
void* pfMemory::getArena();
int pfMemory::ref();
int pfMemory::unref();
int pfMemory::unrefDelete();
int pfMemory::unrefGetRef();
int pfMemory::getRef();
int pfMemory::checkDelete();
Page 1
pfDrawAction(3pf) OpenGL Performer 3.2.2 libpfx C++ Reference Pages
int pfMemory::isFluxed();
void * pfMemory::getArena();
int pfMemory::getSize();
DESCRIPTION
new pfDrawAction creates and returns a handle to a pfDrawAction. Like
other pfObjects, pfDrawActions are always allocated from shared memory
and can be deleted by the calling pfDelete().
There are two virtual methods in this class which acts as a base class
for all pfDrawActions. They are:
void preDraw(pfChannel *,pfViewer *);
void postDraw(pfChannel *,pfViewer *);
The methods get invoked during the draw callback on each of the channels
that are associated with a given pfViewer. Along with a pointer to the
pfChannel involved, a pointer to the associated pfViewer is also passed
as second argument to the callbacks.
This particular draw action simply calls pfDraw(), which is the minimum
amount of work that a draw action must perform. A more useful draw action
is pfSipleDrawAction which calls pfChannel::clear() in the ::preDraw()
method.
Note that because of the way that draw actions work, the user must not
specify a draw callback on the channels himself or it will break this
piece of functionailty.
NOTES
The libpfx source code, object code and documentation are provided as
unsupported software. Routines are subject to change in future releases.
The most recent version of this software may be found at the following
URL: http://oss.sgi.com/projects/performer/.
SEE ALSO
pfSimpleDrawAction, pfViewer
Page 2