I've been trying to figure out how to resize the drawing view on eaglview as opposed to the default 320x480 dimension. My Eaglview is attached to a UIViewController. What I really want to do is find out where viewrenderbuffer is calling its width and height parameters from.
In the code below I can see that the backing width and height are being taken from the binded viewRenderbuffer and through the renderbufferstorage call. I don't want to use the screen default 320x480 though because if I display a landscape photo on portrait view it will be stretched out and vice versa.
- (void)reshapeFramebuffer
{
glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer);
[context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:(CAEAGLLayer*)self.layer];
glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth);
glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);
// This application only needs color. If depth and/or stencil are needed, ensure they are also resized here.
//Debug.h
rt_assert(GL_FRAMEBUFFER_COMPLETE_OES == glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES));
glCheckError();
}