Re: [AD] multiple windows

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


In Quartz, on OS X, the equivalent of a BITMAP is NSImage. NSImage
isn't an image; it's just a container for 'representations,' which are
the actual bitmaps. The idea is that the OS picks the best rep for the
job, and automatically adds its own cached representations (e.g. it
can rasterise a PDF). We'd have to do something like that, which would
be in the spirit of our 'it just works' philosophy, but I guess it
would not be fast.

Anyway, most games as far as I know do not have multiple windows, so
the user would not be burdened too much.

In the implementation, we could assign an unique integer ID to each
_incompatible_ OpenGL context (I think there is a way on Macs to
determine whether two contexts can share texture names etc, is this
generally available?) and check that the bitmap's ID matched. I assume
this would be a benefit in the most common case which is multiple
windows with the same pixel format. If it doesn't match, would the
blit fail or just work non-accelerated?

Finally we'd need something like
BITMAP* create_compatible_bitmap(DISPLAY*, BITMAP*)
which would copy a bitmap but in a form suitable for accelerated
blitting on that display.

Pete


On 8/20/06, Robert Ohannessian <ROhannessian@xxxxxxxxxx> wrote:
That's why in my API proposal, you can only create AL_BITMAP based an
AL_DISPLAY (or another AL_BITMAP's AL_DISPLAY origin). That way, there's
no question as to who owns the bitmap. Cross-display blitting can also
trivially be disallowed this way.

GL contexts, for example, are not necessarily sharable (they often are
though). So if you create a texture in one of them, you can't
necessarily use it on another.



> In case we want Allegro to transparently handle this, each AL_BITMAP
> would possibly need a cached version of the bitmap for each AL_DISPLAY
> it is going to be used in. So I would say, this indeed will be too
> messy.


Yes, let's leave this to higher-level libraries like OpenLayer.



> -----Original Message-----
> From: alleg-developers-bounces@xxxxxxxxxx [mailto:alleg-
> developers-bounces@xxxxxxxxxx] On Behalf Of Elias Pschernig
> Sent: Sunday, August 20, 2006 7:54 AM
> To: Coordination of admins/developers of the game programming library
> Allegro
> Subject: Re: [AD] multiple windows
>
> On Sun, 2006-08-20 at 13:06 +0100, Peter Hull wrote:
> > Another point is that, bitmaps may need to hold a set of different
> > representations for each display. For example, if they try to
> > accelerate blitting by matching colour depth/format or by generating
a
> > texture. This could get very messy.
> >
>
> True. For example, each window could have its own OpenGL context, so
> there might be restrictions on how you can mix textures between them.
>
> In case we want Allegro to transparently handle this, each AL_BITMAP
> would possibly need a cached version of the bitmap for each AL_DISPLAY
> it is going to be used in. So I would say, this indeed will be too
> messy.
>
> We simply could disallow blitting of bitmaps between incompatible
> AL_DISPLAYs. Users who need multiple displays can always transfer
> bitmaps using memory bitmaps and do their own caching for performance,
> or else just use compatible displays when possible.
>
> --
> Elias Pschernig
>
>
>
------------------------------------------------------------------------
-
> Using Tomcat but need to do more? Need to support web services,
security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
>
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> --
> https://lists.sourceforge.net/lists/listinfo/alleg-developers
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
--
https://lists.sourceforge.net/lists/listinfo/alleg-developers





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