MackeyK24

[SOLVED] - Performance Of Many scene.registerBeforeRender

Recommended Posts

Is there a performance impact of calling MANY 'scene.registerBeforeRender' for each scene component could be hundreds OR should there be ONE BIG scene.registerBeforeRender

and i maintain my own array of scene components i want to 'tick' along and loop thru my array calling 'myobject.update'

i would much rather not have to maintain an array of scene components for ticking and simple call: scene.registerBeforeRender(myobject.update) and scene.unregisterBeforeRender(myobject.update) for each and every scene component i am going to have???

Thanks for the info :)

 

Share this post


Link to post
Share on other sites

It's useful to remember that Babylon does a lot of work - matrix multiplications, vertex uploads, etc. - for every mesh in your scene, every frame. Basically the only time you need to consider performance is when your code starts doing a comparable amount of work. Anything else is effectively free, compared to the cost of rendering 3D objects.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.