I am working on an application for the iPhone OS, the main view of which is a two-dimensional representation of OpenGL (this is a subclass of the Apple EAGLView class, which basically creates an orthoprojective 2D environment) with which the user interacts directly.
Sometimes (not always) I would like to display some controls on top of this basic GL view - think of it as a Heads-Up display. Note that you can scroll / animate from the bottom of the baseline, while the controls should be fixed on the screen above.
I'm good at Cocoa's views in general, and I'm good at CoreGraphics, but I'm green with Open GL, and the EAGLView operations (and its relationship with CALayers) are pretty opaque to me. I'm not sure how to mix most effectively in other elements (read: best performance, least hassle, etc.). I know that as a last resort I can create and maintain geometry for all other controls and visualize them on top of my base geometry every time I draw / replace, and therefore just save everything that the user sees in one view. But I'm less sure about other methods, such as having another view on top (UIKit / CG or GL?), Or somehow creating other layers in my only view, etc.
If people were so kind as to write brief comments, if they had traveled along these roads before, or at least pointed me to documentation or discussion on this issue, I would greatly appreciate it.
Thank.
source
share