Rotating glScissor for layer clipping

Dear All,

I am looking forward for implementing layer Clipping for OpenGL ES 2.0 based UI system where in all childern are
clipped inside parent region. Imagine like a Message box as parent with buttons as childern in it. This UI Tree has more than 5 levels of depth ( parent->parent->…parent->leaf child).

The idea is to make sure child is clipped with in Parent bounds
even during rotation. Let me know the right appoarch

  1. stencil buffers. ( need to know performance hit)
  2. re-generate the verticies of childern (in this case rect may not stay rect).
  3. glScissor ( is not helping us during rotation of parent or child)
  4. Clipping planes ( not directly supported in OpenGL ES )

Regards,
Kumar.k

“even during rotation” : what is your UI use case for this ?
Scissor is probably the fastest, but GL ES hardware is special, you have to benchmark each way to very the performance impact.

Find the attached images explaining where childern goes out of parent, and needs clipping, Images are only in XY Plane they can be any any orientation( both parent and child).