Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: joreldraw on October 25, 2012, 02:25:36 AM

Title: On drag & vertices increment problem
Post by: joreldraw on October 25, 2012, 02:25:36 AM
Hi, i have my Draggable panel with grid with 225 checkbox(checkmark + label)

All work fine except when i drag the panel. Ondraggin the vertices count increase about x9.

Why this? How can i reduce this? because i recieve an Too many vertices error.

Thanks
Title: Re: On drag & vertices increment problem
Post by: ArenMook on October 25, 2012, 02:26:46 AM
Because when you drag, the panel doesn't do clipping as clipping checks would result in the draw buffer being rebuilt every update, which is expensive. Not doing clipping makes it much faster.
Title: Re: On drag & vertices increment problem
Post by: joreldraw on October 25, 2012, 02:59:36 AM
Uiviewport is better solution for this? or Dragcamera?
This only render in buffer visible elements , right?

Title: Re: On drag & vertices increment problem
Post by: joreldraw on October 25, 2012, 04:35:38 AM
I test this, whith drag cam, and using viewport with drag panel but not is a solution.

All way enable all object on drag and the vertices count go x9.

:(
Title: Re: On drag & vertices increment problem
Post by: ArenMook on October 25, 2012, 04:40:16 AM
Why do you care that vertex count goes up?
Title: Re: On drag & vertices increment problem
Post by: joreldraw on October 25, 2012, 04:55:30 AM
Because when the element list in about 100, i can drag nice.
But when this list go to 200 and i try to drag i recieve the error "Too much vertices" and dissapear, later appear at beggining position (Can't drag )
Title: Re: On drag & vertices increment problem
Post by: ArenMook on October 25, 2012, 06:44:40 AM
Get rid of shadow or outline effect. Shadow doubles the vertex count. Outline multiplies it by 5.
Title: Re: On drag & vertices increment problem
Post by: joreldraw on October 26, 2012, 01:40:13 AM
I know, my hierachy is superoptimized, without any fx, only 1 label & 1 slicesprite pero object.

I  check that when i drag all collider go On and there is when the vertices count go Up.
Is possible to make something to paginate the grid list or be loading secuencially from the panel position?

Thanks
Title: Re: On drag & vertices increment problem
Post by: ArenMook on October 26, 2012, 06:31:00 AM
You will need to write custom logic for that.