don’t really play with the render stuff but my guess is your probably not using “the max way” for these things… you have probably got to use a callback
so in your class declare something like…
static void PreFrameHandler(void* param, NotifyInfo* info);
then it would look something like this…
void MyClass::PreFrameHandler(void* param, NotifyInfo* info)
{
MyClass* mcls = static_cast<MyClass*>(param); // get your class instance so you can call its functions
RenderGlobalContext* rgc= reinterpret_cast<RenderGlobalContext*>(info->callParam); // get the global render context
// do stuff here with
mcls->DoStuff( rgc->time);
}
then you register somewhere in the contructor or when you want it active with…
RegisterNotification(PreFrameHandler, this, NOTIFY_PRE_RENDERFRAME);
and then unregister in the destructor or when it’s appropriate with…
UnRegisterNotification(PreFrameHandler, this, NOTIFY_PRE_RENDERFRAME);