Re: [AD] al_acknowledge_display_disconnected |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Tue, 22 May 2012 15:29:07 -0600, Trent Gamblin <trent@xxxxxxxxxx> wrote:
> On 2012-05-22, at 11:45 AM, Elias Pschernig wrote:
> > There are 3 ways to do this, from the API point of view:
> >
> > 1) case DISCONNECT:
> > al_acknowledge_display_disconnected(d);
> > // this also destroyed the display
> >
> > 2) case DISCONNECT:
> > al_acknowledge_display_disconnected(d);
> > // be oblivious because d has its vtable filled with dummy methods
> > // now who will not access the OpenGL context
> > ...
> > al_destroy_display(d);
> >
> > 3) case DISCONNECT:
> > al_destroy_display(d);
> >
> > You suggested way 1) and I think what Peter meant is way 2). Personally
> > I think I'd prefer way 3, it keeps the al_create_display /
> > al_destroy_display symmetry and there's no (possibly confusing) new
> > function to describe in the docs.
>
> Implemented #3 for iOS. Thanks.
I meant 3 as well.
What happens to the rendering context? I've thought for a while that
you should be able to create a "null" display with a rendering context
but no visible window. In this case you might later create a new
visible window using an existing context. Possible?
Peter