Notifications
Clear all

[Closed] Can't retrieve render time mesh

I’m getting mad about this…

Obviously I’m using

Mesh *m=((GeomObject*)obj)->GetRenderMesh(currTime,n_orig,nullView,needDelete);

And I’ve called before:

BroadcastNotification(NOTIFY_PRE_RENDER, (void*)(RendParams*)&rpar);
   ..........
 BroadcastNotification(NOTIFY_PRE_RENDERFRAME, (void*)(RenderGlobalContext*)&rendParams);

I really suspect that the problem could come from (called after the broadcasts and before getrendermesh):

mnode->RenderBegin(t)

Since it always returns 0.

The problem is that m is the viewport mesh and no the render mesh.

Thank you in advance for any tip!!!

PS. the test scene was a box converted to poly + turbosmooth applied only on rendertime.

EDIT: I tried with referencemaker* too and it returns != 0 when RenderBegin but still I had the same mesh as viewport.