Saturn
Saturn

Reputation: 18149

Change OpenGL ES version on iOS

My OpenGL calls are behaving a bit strange on iPhone 5S and iPad Air. I don't know why, but maybe it is due to the fact that they support OpenGL ES 3, whereas previous devices do not. So I guess it is using OpenGL ES 3 and that may be the problem.

I don't know much about it. Is there a way force my app to use OpenGL ES 2?

Upvotes: 2

Views: 824

Answers (1)

Reto Koradi
Reto Koradi

Reputation: 54592

You specify the API version when you create the OpenGL context. For ES 2.0, the call to create the context looks like this:

EAGLContext* pCtx = [[EAGLContext alloc] initWithAPI: kEAGLRenderingAPIOpenGLES2];

For ES 3.0, the context creation looks like this:

EAGLContext* pCtx = [[EAGLContext alloc] initWithAPI: kEAGLRenderingAPIOpenGLES3];

Upvotes: 3

Related Questions