title: OpenGL ES 2.0 renderbufferStorage crash
body: <p>It seems that recently my app crashes because the renderbufferStorage method returns false. I don't know what happens, so I've added tests before but they are never raising exceptions. I'm on the main thread, the current context seems fine, the eaglLayer too, but anyway it crashes at renderbufferStorage ..</p>
  
  <pre><code>EAGLContext* defaultEAGLContext = getDefaultContext();
  EAGLContext* currentContext = [EAGLContext currentContext];
  
  if(![NSThread isMainThread]) {
      NSLog(@"ERROR : renderbufferStorage not called on main thread");
      @throw [NSException exceptionWithName:@"ERROR"
                                     reason:@"renderbufferStorage not called on main thread"
                                   userInfo:nil];
  }
  
  if(!currentContext) {
      @throw [NSException exceptionWithName:@"ERROR"
                                     reason:@"Current context is null"
                                   userInfo:nil];
  }
  
  if(!defaultEAGLContext) {
      @throw [NSException exceptionWithName:@"ERROR"
                                     reason:@"Default context is null"
                                   userInfo:nil];
  }
  
  if(defaultEAGLContext != currentContext) {
      @throw [NSException exceptionWithName:@"ERROR"
                                     reason:@"Default context is different than current context"
                                   userInfo:nil];
  }
  
  if(!_eaglLayer) {
      @throw [NSException exceptionWithName:@"ERROR"
                                     reason:@"EAGL layer error"
                                   userInfo:nil];
  }
  
  if (![defaultEAGLContext renderbufferStorage:GL_RENDERBUFFER fromDrawable:_eaglLayer]) {
      NSLog(@"ERROR : Failed to obtain renderbuffer storage from layer");
      @throw [NSException exceptionWithName:@"ERROR"
                                     reason:@"Failed to obtain renderbuffer storage from layer"
                                   userInfo:nil];
  }
  </code></pre>
  
  <p>Do you know why this method would return false, even randomly ? Thanks in advance</p>