Straightforward guidelines for converting OpenGL to OpenGL ES?

| | August 6, 2015

Is there a straightforward list of finite steps that I need to follow to convert an OpenGL program into an OpenGL ES that’s used on the iPhone and iPad? I’d be using GLKit.

I’ve seen some similar API functions but I gather that triangles have to be presented differently.

One Response to “Straightforward guidelines for converting OpenGL to OpenGL ES?”

  1. Sean Middleditch on November 30, -0001 @ 12:00 AM

    Since you’re not saying which version of GL you’re using, I’m going to assume it’s reasonably modern.

    There’s not that much difference, no. Some of the deprecated functions are gone entirely, and some of the newer desktop GL functions are not yet in GL ES, but otherwise they’re the same. “Presenting triangles” will only be very different if you’re still using the ancient OpenGL 1.x immediate mode API. If you’re using VBOs already, the code will translate almost directly to GL ES. You’ll also need to use shaders, as GL ES 2.x does not support any fixed function code, but again the APIs and shader language features are very comparable, and may even port over with no changes at all.

    There are some performance things to care about, but there is no straight forward guide to those. You need to profile, benchmark, and study your target hardware. In general, though, some of the advanced rendering techniques that are good on desktops just don’t run well on mobile devices.

Leave a Reply