Re: [AD] bitmaps and displays

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


When you create a new context in OS X, you can specify an existing
context that you want it to share with. Then, internally, it
reference-counts the resources and deletes them when the last context
is deleted.

It's not clear to me (it's not in the docs AFAICS) what the rules are
for when you can and can't share (for example, can 2 contexts with
different colour depths share?) We'd have to allow for there being
groups of mutually incompatible sets of displays.

Hope that helps,

Pete


On Tue, Apr 15, 2008 at 3:41 PM, Milan Mimica <milan.mimica@xxxxxxxxxx> wrote:
> I've been trying to sort out the bitmaps management problem in relation to displays.
>
> First, a question: Does D3D display driver require that the bitmaps must be
> destroyed before the last display has been destroyed? WGL, GLX and MacOSX do
> AFAIK, and I've got the code for destroying bitmaps almost working. Basically
> each display keeps a vector of bitmaps which depend on it.
>
> Bitmaps in GLX are not bound to the display which was current when
> al_create_bitmap() was called any more. GLXcontexts share resources from now on.
> (Hm, now I wonder If we can take that for granted. Not a big problem to fix anyway.)
>
> I failed to do the same in WGL, because wglShareLists() requires an empty
> context and allegro API allows al_create_display() to be called any time... I
> tried and it didn't work. I suspect that was the problem.
> So the problem in WGL is that the bitmap cannot be used after the display which
> was current at the time al_create_bitmap() was called has been destroyed. The
> bitmap is bound to this display. Since this problem affects only WGL driver (I
> don't know about MacOSX), having bitmaps bound to a display in the API is not an
> option.
>
> My idea is that in that case the bitmap is automatically converted to a memory
> bitmap. Can we silently change the bitmap type? I think we can. There must a way
> to get the current flags for the bitmap.
>
>
> --
> Milan Mimica
> http://sparklet.sf.net
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> --
> https://lists.sourceforge.net/lists/listinfo/alleg-developers
>




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