Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Well, as the title says, I wanna optimize my Vesa lin ( ) function. I have optimized it prettuy well (I think) so far - can anyone see anything I could improve?
You may wanna consider special cases: horizontal, vertical and if they are aligned on 1,2,4,8 bait boundaries.
look assembly listing of your code (especially if its gcc) and fix it yourself http://www.osdev.org/phpBB2/viewtopic.php?t=14138
as of your algorithm I dont know
Hi,
I think you are using Bresenham which is AFAIK the fastest line drawing algorithm.
Bresenham uses a decision parameter P(k), for slope m < 1, it only inc Y or leave Y according to the decision parameter P(k), while X is always incremented. For m > 1 reverse the role of X & Y.
I'll remove the attachment when my quota is full :)
(43.91 KiB) Downloaded 47 times
Systems and Computer Engineering Researcher
"Do you pine for the nice days of Minix-1.1, when men were men and wrote their own device drivers?" -- Linus Torvalds http://sce.carleton.ca/~maslan