Porting OS X OpenGL to iOS

I have some old OpenGL OS X Cocoa programs which I wrote 10+ years ago and I would like to port them to iOS. I appreciate that I need to use the ES1 or ES2 variant of OpenGL and I also need to convert Vertex calls to calls using Vertex Arrays. From what I have heard, ES1 would require the least work and should suffice for my simple graphics needs.


I think I also need to set up frame buffers and the like. My programs generated 3D textured surfaces used to illustrate various optical phenomena and the surfaces were fairly easy to generate using GL_QUAD_STRIP calls (not available in ES1). The original OS X code needed to set up a pixel format using NSOpenGLPixelFormat. Since this is not used in ES, is there something I need to replace it with?


Any suggestions about how to go about this would be much appreciated.


Thanks.


Warren Nagourney

Hi Warren,


Funnily enough, I've just posted to another thread with example code that runs in iOS written by Apple - that'll show you how to setup an OpenGL view on the iPhone even if it isn't written in Swift. I've done minor stuff on OSX and iOS and I think that using the latest ES is almost certainly the way to go. From what I've read everywhere ES1 is quite different and it may mean re-writing the re-write sooner than you'd like to!


Todd.

Porting OS X OpenGL to iOS
 
 
Q