switching shape from time to time, new Object3d or setMesh?

Started by MichaelJPCT, November 11, 2020, 04:12:13 PM

Previous topic - Next topic

MichaelJPCT

Hi Egon,
i want some 3d models in main World to be rendered also in another World, and the models in the other World need to be switched from time to time, assuming the meshes are all in GPU, how to switch models?
create new Object3d or call Object3d.setMesh ?
an object3d needs some initialization before rendering, i guess setMesh would be quicker?

EgonOlsen

I would go with what the docs for setMesh() state:

QuoteShouldn't be required in normal applications.

Or in other words: It won't work that way. You can't set a new mesh to an object that's already in use (i.e. that has been compiled and rendered). This method is mainly there, if you want to build keyframe animation sequences on your own and similar things. Not for changing the appearance of an object.