You have to dispose the current framebuffer and create a new one. However, i don't recommend it. Some drivers don't like it and it destroy the GL context, i.e. all textures and data has to be uploaded again. Compiled objects might not like much either. If possible, move the resolution selection to an options dialog before the actual application. It's not that fancy, but works much more reliable.