1

In OpenGL ES, how can I "clip" drawing to a rectangle?

view story
linux-howto

http://stackoverflow.com – I am working on an Android application where I am using a single OpenGL ES instance. In some instances, I am drawing a custom (rectangular) dialog ontop of everything else, with scrolling text, lines, etc. The dialog does not take up the whole screen, and I am drawing content that is larger than the dialog box, which is scrolling across the dialog, like a marquee. Of course, since I am drawing this dialog last (ontop of every other view), all the vertices I am drawing are going to be visible, but I would like to tell OpenGL to not draw outside of the dialog rectangle for any of its renderin (HowTos)