Jump to content

Is there any description of render process?


user471
 Share

Recommended Posts

  1. updateTransform is calculating matrices based on position, scale and rotation of elements. Its recursive. But some containers (like ParticleContainer) prevent that and have their own magic for it.

To render DisplayObject you have to switch renderer to plugin corresponding to that element. If plugin that was active already, it can add element to the batch (like SpriteRenderer does it), or flush a previous batch. Batches are good for performance. There are different plugins: SpriteRenderer, MeshRenderer, GraphicsRenderer and my own SpineMeshRenderer.

To render container with filters you have to determine its bounds, switch renderer target to some buffer, render childrens, then apply a filter and switch target back.

Some containers (like ParticleContainer) has different logic for rendering: they are using special plugins to render their childrens more effectively. Of course they will work only with children types they know of, dont expect ParticleContainer work with meshes. 

Link to comment
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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...