Martin Reddy (mxr++at++dcs.ed.ac.uk)
Thu, 28 Nov 1996 11:17:31 +0000 (GMT)
You can either write a simple function wrapper that uses a global variable
to remember the object and call its member function, then use this wrapper
as the callback; or, perhaps more elegantly, your callback should be
defined as a static member function of the object, e.g.
class MyClass {
public:
static void DrawChannel( pfChannel *chan, void *data );
};
void MyClass::DrawChannel( pfChannel *chan, void *data )
{
// your Draw call back code here
}
....
chan->setTravFunc( PFTRAV_DRAW, MyClass::DrawChannel );
....
Martin.
+============================================================================+
| Martin Reddy Dept. of Computer Science |
| University of Edinburgh |
| e-mail : M.Reddy++at++ed.ac.uk Mayfield Road, EH9 3JZ |
| http://www.dcs.ed.ac.uk/~mxr/ Tel : +44 131 650 5164 |
+============================================================================+
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:54:02 PDT