0
\$\begingroup\$

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.

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

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.

\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.