Take the 2-minute tour ×  I am trying to write a game using
opengl, but I am having a lot of trouble with the new glkit
classes and the default template from iOS.  - (void)viewDidLoad
[super viewDidLoad];      self.context = [[EAGLContext alloc]
initWithAPI:kEAGLRenderingAPIOpenGLES2];      if (!self.context)
{         NSLog(@"Failed to create ES context");
renderer = [RenderManager sharedManager];     tiles = [[TileSet
alloc]init];      GLKView *view = (GLKView *)self.view;
view.context = self.context;     view.drawableDepthFormat =
GLKViewDrawableDepthFormat24;      [self setupGL];  -
(void)setupGL     int width = [[self view] bounds].size.width;
int height = [[self view] bounds].size.height;      [EAGLContext
setCurrentContext:self.context];      self.effect =
[[GLKBaseEffect alloc] init];     self.effect.light0.enabled =
GL_TRUE;     self.effect.light0.diffuseColor =
GLKVector4Make(0.4f, 0.4f, 0.4f, 1.0f);      //Configure Buffers
glGenFramebuffers(1, &framebuffer);     glBindFram