Re: [AD] Display option change function

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Tue, 2011-10-11 at 10:37 -0600, Trent Gamblin wrote:
> On 2011-10-11, at 10:29 AM, Thomas Fjellstrom wrote:
> >> I do that now with FULLSCREEN_WINDOW. It works well, but of course you may
> >> want a lower resolution than native (but not normally.)
> > 
> > Indeed, FULLSCREEN_WINDOW should solve that.
> 
> I still think toggling a real fullscreen mode could be useful. I know in some cases a real fullscreen mode is faster than a fullscreen window. I don't remember which platform(s) that applies to. Also, a very graphics intensive FPS (If one were ever made with Allegro, and I don't rule that possibility out) might run slow at native resolution, for example.
> 

Wouldn't it work if you essentially do this when toggling the fullscreen
flag under Windows:

al_destroy_display(display)
display = al_create_display(new_width, new_height)

With the (existing?) code to re-upload all bitmaps of course. Things
like user-created FBOs and VBOs and shaders would need to be destroyed
first and then re-created by the user.

-- 
Elias Pschernig <elias.pschernig@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/