![]() |
|
FBlend missing pixels |
BlackEye
Member #3,762
August 2003
|
I'm using FBlend 0.5 b1 from sourceforge. When I use fblend_trans, the rightmost few pixels of the source bitmap aren't drawn. This happens when I'm in a color depth of 32, and the source bitmap width is not a multiple of 4. If I change the color depth to 16, or the source bitmap width to a multiple of 4, it works as expected. The other blend functions don't seem to have this problem. The function fblend_rect_trans_32 works as well with any source bitmap. I've traced the problem to the call to fblend_trans_sse_32, but I don't know assembly so I don't know where the problem is inside the function. Here is a screenshot of the issue and piece of code to duplicate the problem. The first row is drawn by FBlend, the second by the standard allegro functions. The first box is 20 pixels wide, and the second is 19.
I know FBlend is not currently maintained, but it would be nice to know if anyone else has run into this problem, and if you know what needs to be changed in the code to make it work. |
Bob
Free Market Evangelist
September 2000
![]() |
Copy/paste bug. Try this patch on trans32.s:
-- |
BlackEye
Member #3,762
August 2003
|
I got the patch applied. I cleaned all the intermediate files and rebuilt FBlend and the sample app, but it still has the same issue. |
Paul whoknows
Member #5,081
September 2004
![]() |
Just download Fblend HERE. ____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
BlackEye
Member #3,762
August 2003
|
I didn't see a source download for the version on that site. Anyway, I tried the precompiled one and the same issue is there. |
Bob
Free Market Evangelist
September 2000
![]() |
Well I can't explain it. The rest of the code is pretty much the same for 16-bit vs 32-bit. -- |
Paul whoknows
Member #5,081
September 2004
![]() |
I tried your code and I had the same problem! ____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
BlackEye
Member #3,762
August 2003
|
Well I'm glad someone confirmed the problem. I thought I was going crazy. I found that if the source width is a multiple of 4 + 1, it works as well. |
Matt Smith
Member #783
November 2000
|
Probably the reason nobody noticed this before is because it is generally faster and easier to keep all source bitmaps multiples of 4 wide, wherever possible. |
|