Yes,
you should be able to implement this through Quartz Core using layers (see the CALayer class documentation). Indeed, you can have layers hierarchies. Basically you associate each UIView to a different layer, then the layers are rendered together providing a single, composite layer. Besides, you can also apply transforms and animations to layers.
You need to import the QuartzCore header and do something like
#import <QuartzCore/QuartzCore.h>
UIView *myView = [[UIView alloc] initWithFrame...
UIView *openGLView = [UIView alloc] initWithFrame...
CaLayer *myViewLayer = myView.layer;
[myViewLayer addSubLayer: openGLView.layer];
Then, when myView appears on the screen, all the sublayers are merged together and rendered on screen. What happens is that each view renders its layer, while myViewLayer is rendered merging together the two layers.
You can have as many layers as you like. You can create an arbitrary hierarchi by using the CALayer methods
– addSublayer:
– removeFromSuperlayer
– insertSublayer:atIndex:
– insertSublayer:below:
– insertSublayer:above:
– replaceSublayer:with: