Re: [AD] DirectX Windowed mode, one more try

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



----- Original Message -----
From: Isaac Cruz <ICRUZBAL@xxxxxxxxxxx>
To: <conductors@xxxxxxxxxx>
Sent: Friday, December 10, 1999 12:22 AM
Subject: RE: [AD] DirectX Windowed mode, one more try


>
> I forgot to say that you must add the new file wddwin.c in makefile.lst,
> otherwise it won't compile this file. But it seems you have already done
that.

Yes, and the header file changes weren't in the diff either.

> Make sure your desktop is at 8 bit color (the demo will work, but colors
are
> incorrect, would you like to take it? It's a very complicated task)
> Anyway, I have only tested it in my machine (w98), so maybe it doesn't
work in
> NT (but should)
>

Have you tested it in other bit depths?

> And here some thoughts about palette mode:
> A program running in a window has a logic palette that is passed to the
palette
> administrator to make the physical palette. The problem is that the index
aren't
> the same, so the surfaces have to update themselves according to the new
> palette. It's OK with system_bitmaps and video_bitmaps (both DX surfaces),
but
> what's the matter with allegro bitmaps? And what if the user wants to
write
> directly to a bitmap, using an index of his palette?
>

I think the biggest problem is that DX doesn't support hardware blits
between surfaces with different palettes (well maybe it does, but I don't
think it will do conversions between the palettes). So maybe we need to fall
back to a software conversion when the desktop is in 8 bit.

The problem is the 10 first & 10 last colors of the palette. We could create
a lookup table that would map those 20 colors from the original palette to
the resulting palette (which is the same as the original except for those 20
colors). The backbuffer would then be blitted to the desktop surface using a
specific software blitter that uses our (small) lookup table for pixels
using those 20 colors. This won't always look good, but it will look as good
as possible.

Of course there are a more issues involved here (like dynamically update the
lookup table when the palette is changed).

Dominique





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