[Closed] Render Callback c++ SDK
I’m looking to find when max starts and stops rendering to run a function just before and just after the render.
Anyone know about this?
Si
// stuff to do before rendering
void NotifyRenderBegin(void* param, NotifyInfo *info)
{
}
// stuff to do after rendering
void NotifyRenderEnd(void* param, NotifyInfo *info)
{
}
// register two notifications
RegisterNotification(NotifyRenderBegin, this, NOTIFY_PRE_RENDER);
RegisterNotification(NotifyRenderEnd, this, NOTIFY_POST_RENDER);
// dont forget to unregister them somewhere:
UnRegisterNotification(NotifyFrameBegin, this, NOTIFY_PRE_RENDER);
UnRegisterNotification(NotifyFrameBegin, this, NOTIFY_POST_RENDER);
// or per fram use this 2 guys:
NOTIFY_PRE_RENDERFRAME
NOTIFY_POST_RENDERFRAME
see also “Broadcast Notification System” in sdk-help