Re: [AD] problem with Chris' X primitives patch |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Peter Wang wrote:
Chris wrote:The attached patch fixes the exspline problem.Great. It appears to have solved exjoy as well.
There's a small potential issue I just caught. If you use XOR mode then switch to an unsupported mode (leaving XPutImage to do the copy) when in matching depths, a similar issue will occur. The working patch should fix that.
But it seems I've possibly stumbled across a more general problem. Is gfx_driver->drawing_mode called when a new video mode is set, or is the drawing mode reset when a mode is changed?Neither, it seems.
Ok. Well, the current working patch also calls gfx_driver->drawing_mode when setting a mode, so the drawing mode is retained when switching video modes.
Hmm.. after testing this latest patch, it seems there's a problem. Using the test program, I switched on XOR mode drawing and did the putpixel test in three depths: 8, 16, and 32 (matching). The results are problematic.
* In 8-bit, it acts as if the drawing mode is completely ignored.. the pixels are the original colors. I don't see anything in my patch that would cause one mis-matched depth to behave different from another mis-matched depth. * In 16-bit, the pixels are inversed (corectly), although the text displaying the putpixel count is /not/ inversed. I don't ever remember seeing the text invert before, so I would assume this is correct behavior. * In 32-bit (the same as my desktop, so it's using the X routines), the pixels are inversed as well as the text (white text with a black background).
Now, regardless of which is right (between 16 and 32-bit), there's a bug. Either the default font rendering functions for memory bitmaps is improperly ignoring the drawing mode (meaning 32-bit is right), or the text routines aren't temporarilly setting a solid mode in case it falls back on primitives to draw the text (meaning 16-bit is right).
In either case, I'm completely baffled by 8-bit's behavior. - Kitty Cat
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |