ListBox firmware using OpenGl ES scrolling

I am trying to create a shared list in OpenGl ES (for iPhone / iTouch) and I ran into some riddle with clipping ListBoxItems. Each ListBoxItem object will know how to draw itself. The listbox I create will just draw one by one. But what if the number of items is greater than the ListBox? I will need to scroll (not a problem) ListBoxItems up and down. This will be a smooth scroll, so there will be times when the ListBoxItem will be half (or more or less) visible and the other part will be hidden because it is β€œoutside” the ListBox area. How to make this crop work correctly when I create a ListBox widget?

Thanks for any help or links you have,

~ Eric

+4
source share
1 answer

If you need to crop rendering, use glScissor!

void glScissor( GLint x, GLint y, GLsizei width, GLsizei height ) 
+2
source