title: Set Renderbuffer Width and Height (Open GL ES)
body: <p>I'm currently experiencing an issue with an Open GL ES renderbuffer where the backing and width are are both set to 15. Is there any way to set them to the width of 320 and 480?
  My project is built up on Apple's EAGLView class and ES1Renderer, but I've moved it from the app delegate to a controller. I also moved the CADisplayLink outside of it (I update my game logic with the timestamp from this)</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>I add the glview to the window as follows:</p>
  
  <pre><code>   CGRect applicationFrame = [[UIScreen mainScreen] applicationFrame];
     [window addSubview:gameController.glview];
     [window makeKeyAndVisible];
  </code></pre>
  
  <p>I synthesize the controller and the glview within it. The EAGLView and Renderer are otherwise unmodified.</p>
  
  <p>Renderer Initialization:</p>
  
  <pre><code>  // Get the layer
      CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;
  
      eaglLayer.opaque = TRUE;
      eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
                                      [NSNumber numberWithBool:FALSE], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil];
  
      renderer =  [[ES1Renderer alloc] init];
  </code></pre>
  
  <p>Render "resize from layer" Method</p>
  
  <pre><code>- (BOOL)resizeFromLayer:(CAEAGLLayer *)layer
  {   
      // Allocate color buffer backing based on the current layer size
      glBindRenderbufferOES(GL_RENDERBUFFER_OES, colorRenderbuffer);
      [context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:layer];
      glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &amp;backingWidth);
      glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &amp;backingHeight);
  
     NSLog(@"Backing Width:%i and Height: %i", backingWidth, backingHeight);
  
      if (glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES) != GL_FRAMEBUFFER_COMPLETE_OES)
      {
          NSLog(@"Failed to make complete framebuffer object %x", glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES));
          return NO;
      }
  
  return YES;
  </code></pre>
  
  <p>}</p>