RE: [AD] Potential color conversion bug

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


> 
> On Mon, 2005-06-20 at 09:55 -0700, Robert Ohannessian wrote:
> > This code should be moved down in the drivers. There is no
fundamental
> > reason why video bitmaps needs to have the same depth as the screen.
In
> > fact, that's sometimes impossible.
> >
> 
> I think, the screen vtable for AllegroGL could fill in its own
> blit_between_formats, and check there if the source is a video bitmap
as
> well.


Sure, but then AllegroGL would be duplicating all the code inside
Allegro's blit() function. That seems like a waste.



> Else, assume we change the order. Now someone blits a memory 8-bit
> bitmap to a 32-bit screen, with the DirectX driver. It will now call
> blit_from_memory, instead of blit_between_formats as it does now. But
> blit_from_memory probably assumes the same depth (didn't check).



Sure, but then just make ddraw->vtable->blit_from_memory() call
ddraw->vtable->blit_between_formats() if it can't do a blit with
conversion at the same time.


> So I'd
> be for leaving the order, and adjusting AllegroGL's vtable, since it
> seems to be the only case with problems.

So far...


> 
> Would there be any complication with just having AllegroGL's
> blit_between_formats check if both bitmaps are video bitmaps, and in
> that case bypass the color conversion?


I'd need to duplicate (pretty much) the whole of blit() in AGL, since I
need to support memory <-> video blits.




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