Author Topic: Performance on nested panels  (Read 1629 times)

Seeting

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Performance on nested panels
« on: April 06, 2016, 06:34:54 AM »
Hi!

I would like to ask about the rendering methodology when it comes to nested panels. I hear that if I need to animate a widget, I should make it a child of a panel, and move the panel around instead. Here is my setup:

Panel
- Panel
-- Sprite
-- Sprite
--- Panel <--- I animate this panel
---- Sprite
--- Panel <- and this panel
---- Sprite

So my question is that when I animate the panels I marked, does it affect the buffering state of root panels as well? Thank you!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Performance on nested panels
« Reply #1 on: April 06, 2016, 03:18:07 PM »
Animating a child panel does not affect the parent's geometry at all. Generally it's a good idea to keep frequently animated widgets together in the same panel if possible, or their own panels if not. The idea is to keep the changes of those widgets from affecting draw calls of widgets that don't change.