Author Topic: Changing a resolution  (Read 1060 times)

Offline PaldxD

  • byte
  • *
  • Posts: 25
    • View Profile
Changing a resolution
« on: March 10, 2011, 03:14:21 pm »
how can I do to change the screen resolution with the program running?

using displayGL :)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12011
    • View Profile
    • http://www.jpct.net
Re: Changing a resolution
« Reply #1 on: March 10, 2011, 09:00:53 pm »
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.