I understand that i can’t adapt GLPainter example from apple to retina due to a bug mentioned here: Problems displaying full-screen CAEAGLLayer on Retina iPad
Any one knows a good starting point to creating an Open-GL basic painter with brushes, that will work on Retina?
or – creating an openGL painter without CAEAGLLayer
I think that the starting point can still be
GLPaint, only you need to set toNOhte value ofkEAGLDrawablePropertyRetainedBackingand change the way you draw in your GL view.GLPaintwill only render to the gl buffer the strokes you draw by touching the screen, relying onkEAGLDrawablePropertyRetainedBackingto make the full buffer content retained. An alternative might be redrawing at each step the full content of the buffer. This would require keeping track of all the strokes that were drawn and kind-of “replay” them.I suspect that in any serious painting app you would not rely on
kEAGLDrawablePropertyRetainedBackingto retain the buffer content due both to performance and the need for managing you own data structure representing the painting (for anything like storing, sending the painting etc.) and would therefore implement your own solution for it.