From: MLM Veraart (veraart++at++fel.tno.nl)
Date: 10/31/2002 03:32:33
Denis Taniguchi wrote:
>
> Hi all,
>
> We developed a HUD that works fine, using the already well known GL calls in
> the draw process, and so forth.
> But now, it would be interesting if we could manage to build a class
> "pfHUD", and for example, having a Draw method which we would call from the
> Draw process. In other words we would like to encapsulate the GL calls made
> on the Draw process in a class method.
> As long as I tried, simply defining a class and calling it on draw or
> pos-draw is not the right way.
> Did anyone already do this? Any ideas, tips, sample codes will be
> appreciated.
> Regards!
>
> Denis Taniguchi
> Yokohama National University - Dept. Information Media and Environment
> Sciences
Hello,
It probably has to do with the multi process stuff.
Define a pointer to the class in your Shared memory struct.
In the class definition use
class MyClass
{
PFSTRUCT_DECLARE
public:
// the rest of the class
void draw(pfChannel* chan);
};
This will ensure your class will be in shared memory when allocated.
Allocate the instance with
Shared->myclass = new MyClass();
Mario
This archive was generated by hypermail 2b29 : Thu Oct 31 2002 - 03:35:24 PST