[AD] [ alleg-Bugs-3060766 ] Software line drawer skipping pixels

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


Bugs item #3060766, was opened at 2010-09-06 20:47
Message generated for change (Comment added) made by siegelord
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=3060766&group_id=5665

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Addons
Group: 4.9
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Trent Gamblin (trentg)
Assigned to: Nobody/Anonymous (nobody)
Summary: Software line drawer skipping pixels

Initial Comment:
It's possible to get a missed pixel with the software rendered with the following code:


#include <allegro5/allegro.h>
#include <allegro5/allegro_primitives.h>

int main(int argc, char **argv)
{
	al_init();
	al_init_primitives_addon();
	
	ALLEGRO_DISPLAY *display = al_create_display(600, 600);
	
	al_set_new_bitmap_flags(ALLEGRO_MEMORY_BITMAP);
	ALLEGRO_BITMAP *bmp = al_create_bitmap(600, 600);
	al_set_target_bitmap(bmp);
	al_clear_to_color(al_map_rgb(255, 255, 255));

	al_draw_line(285, 387, 248, 388, al_map_rgb(0, 0, 0), 1);

	al_set_target_bitmap(al_get_backbuffer(display));
	al_draw_bitmap(bmp, 0, 0, 0);
	al_flip_display();

	al_rest(10);
}

There's a gap in the middle of the line.

----------------------------------------------------------------------

>Comment By: SiegeLord (siegelord)
Date: 2010-09-13 19:58

Message:
This particular test case is fixed in rev. 13730. The underlying problem of
requiring a bias for the floorf function is still not resolved to my
satisfaction however. See the note in tri_soft.c.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=3060766&group_id=5665




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