4

We are about to launch a title on the iOS appstore, and we've just recently found that it does not work on iOS 8. The game loads to a black screen, however everything else apepars to be working (music can be heard, it reacts to touchscreen, just nothing on the display).

Our engine is quite old and uses OpenGL ES 1.1. I'm now convinced this is the issue, as I've tried another (old) tutorial that renders a black screen.

I've looked online for any sort of discussion about this, but can't seem to find anything. Does anyone have any 1.1 apps out there that they can confirm have either stopped working, or do work?

I'm now looking at the task of updating the engine to 2.0, which is no small feat considering the size of the project, and the fact we're due to launch very shortly. It wouldn't make sense that Apple would just drop support for 1.1 without saying anything, so I'm hoping i'm mistaken in this.

genpfault
  • 51,148
  • 11
  • 85
  • 139
  • I'm not into bitten fruit, but can't you try to use a compatibility-profile during openGL init? – St0fF Sep 28 '14 at 21:44
  • This might be worth contacting Apple directly and burning a TSI. The OpenGL ES Programming Guide still references Open GL ES 1.1 under `Choosing Which OpenGL ES Versions to Support`. Link to docs:https://developer.apple.com/Library/ios/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/OpenGLESontheiPhone/OpenGLESontheiPhone.html#//apple_ref/doc/uid/TP40008793-CH101-SW6 – Robotic Cat Sep 28 '14 at 21:53
  • @RoboticCat - Yeah, you're right, I'll contact them now. – Graeme Laws Sep 28 '14 at 22:09

3 Answers3

2

I had the same problem. The fix was - NOT to addSubview

//[self.window addSubview:glView]; // this produces black screen on ios8 devices

[self setView: glView];

Another trick about ios8 is that for a landscape App this code

const CGRect r = [[UIScreen mainScreen] bounds];

returns landscape screen size. For iOS <8 it was always portrait screen size. So now I am using max(x,y) for X and min(x,y) for Y.

pashaka
  • 21
  • 1
  • Can anyone post a barebones OpenGL ES 1.1 project that works? Preferably that uses autorotate and has a navigation view controller. – Rasterman Oct 30 '14 at 17:11
1

OK, I've made some progress. In answer to my question, OpenGL ES 1.1 is NOT discontinued.

I don't know what's changed since iOS 8, but certainly some code doesn't work anymore. I've managed to make some headway by replacing my main app delegate and GL Viewcontroller with one off a tutorial, and it's now rendering, albeit on half the screen and skewed.

So to confirm, 1.1 is fine, it's an issue with my code.

1

I fixed an issue similarly described here by changing CGFloats to GLfloats (This includes CGPoints because they use CGFloats.) This has nothing to do with OpenGLES 1.1 or 2.0 since I was having the same issue in both of them.

The issue was that OpenGL was that CGfloats are a typedef of float on 32-bit devices while they are a typedef of double on 64-bit devices. GLfloats are provided for exactly this purpose to solve this issue. GLKVector2 is also provided by apple to solve this problem between 32 and 64-bit devices.

Kevin K
  • 35
  • 6
  • 1
    I was having the same issue after upgrading a ES 1.1 project for iOS to to include x64. Using GLFloats as Kevin described fixed the issue for me. Ensuring that the vertex arrays that I passed to draw arrays for GL_FLOAT enum type were composed of GLfloats instead of CGFloat's inside of CGPoints fixed this for me. Since I am targeting iiOS, GLKVector2 is not available. But I just made a new struct of two GLfloats. Problem fixed. – Jim Range Jun 13 '15 at 05:46