Re: [AD] OS X full screen resize (was Re: Allegro 5 TODOs (from wiki))

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


2008/12/10 Evert Glebbeek <eglebbk@xxxxxxxxxx>:
>
> Still crashes here. Well, I didn't really expect this to be magically
> fixed, but I thought I'd give it a go. :)
> I'm not entirely sure it's as simple as Milan says it is, but maybe
> that's because I don't fully understand what he says.
>
> ex_fs_resize crashes on al_destroy_display(), up until that point
> everything seems to work fine (was that already the case?). In case it
> helps, I get the following traceback from ex_fs_resize (goes un
> further, but the rest certainly isn't too relevant):

You can look at the steps to be taken when resizing a FS display in
src/win/wgl_disp.c in wgl_resize_display(). Initially I was going to
write down a list of things but I think that the code is self
documented enough.
The key thing is separation of destroy_display()/create_display() and
destroy_display_internals()/create_display_internals(). The first one
interfaces with allegro (allocates the pointer, registers the event
source...) while
destroy_display_internals()/create_display_internals() must
destroy/create the graphics context and everything around it, nothing
less nothing more.
You should really not be calling al_destroy_display() when resizing a
display as it will allocate a new AL_DISPLAY pointer and everything...

I just took a look on osxgl.m and it doesn't seem to have such
separation... ouch.



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