Where to start with an OpenGL layout for a Retina display

I understand that I cannot adapt the GLPainter example from apple to retina due to the error mentioned here: Problems displaying full-screen CAEAGLLayer on iPad Retina

Does anyone know a good starting point for creating a basic Open-GL brush painter that will work on Retina?

or - create an openGL layout without CAEAGLLayer

+2
source share
1 answer

I think the starting point can still be GLPaint , only you need to set the value to NO hte kEAGLDrawablePropertyRetainedBacking and change the way you paint in your GL view.

GLPaint will only display the strokes you draw by touching the screen in the gl buffer, relying on kEAGLDrawablePropertyRetainedBacking to save the full buffer content. An alternative would be to redraw the full contents of the buffer at each step. This would require tracking all the strokes that were drawn, and their kind of "repeat."

I suspect that in any serious drawing application, you will not rely on kEAGLDrawablePropertyRetainedBacking to save the contents of the buffer due to performance and the need to manage your own data structure representing the picture (for something like storing, sending a picture, etc. .. ) and therefore will implement its own solution for you.

0
source

All Articles