0
votes

I am working on an application and a lot of the code is based on the GLPaint sample from Apple.

In the GLPaint sample the framebuffer and colorbuffer are destroyed and recreated in layoutSubviews.

I load an image from the imagepicker and resize it so width/height is within within maximum texture size. I then set the GLview frame to the same size.

When I resize my view and layoutSubviews is called for the second time calling context renderbufferStorage:fromDrawable: returns NO and therefore my FBO is incomplete. This is the exact same code that is initially used to set up the FBO and colorbuffer.

What's the proper way to resize the renderbuffer?

Code: https://gist.github.com/1340465

1

1 Answers

1
votes

I'm pretty sure that there is no way to resize the render buffer. The only way is to recreate it when the target view is resized.