Redraw only when needed

Recommended Posts

Is there a way to have Pixi only redraw as needed?

For example, in the RenderTexture sample, the GPU is at 20% but nothing is moving. 

Can I tell items not to redraw if they are idle?  Or how can I implement a "needsUpdate" flag?

In my app, the screen does not change frequently, and it sits idle on a big screen for long periods of time.
Over time the machine heats up and the fan kicks in with the GPU so high, in my case over 50%.

I have looked at the requestAnimationFrame loop, and I need this because I do want to animate sometimes ... just wondering where can I hook in to Pixi to improve this.





Share this post

Link to post
Share on other sites

Ok, thanks for the replies, I see now that render(stage) does everything, so I'll need to break that up and only render what is needed.

I do have a background stage area that I can separate out into a layer too.

Share this post

Link to post
Share on other sites
11 minutes ago, Megabyte said:

I just pass throught same question, in pixi4 its necessary to call .stop() method to disable auto rendering firstly.

I assume you mean if you are using PIXI.Application. You can also pass { autoStart: false } to prevent it from starting the internal ticker.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.