I have a sub-classed CAOpenGLLayer class that overrides drawInCGLContext there I draw a rectangle with OpenGL . CAOpenGLLayer added to CALayer and displayed.
So when I would like to do something, I would need to do this in drawInCGLContext using this architecture.
What I would like to have is some kind of context used by another class for drawing, animation or rendering, but will be displayed every time drawInCGLContext .
So basically the only thing my subclass has to do is show the remote (OpenGL)context , what is the best way to achieve this? Or should I consider a different approach?
* Do not use CALayer not an option.
source share