[SDL] Linedrawing

Norbert Melzer norbert.melzer at gmx.net
Sat Jan 5 11:16:20 PST 2008


Am Sat, 5 Jan 2008 17:08:42 +0000 (UTC) schrieb Zedr0n:

> Norbert Melzer <norbert.melzer <at> gmx.net> writes:
> 
>> 
>> Hi Group!
>> 
>> I have a problem with drawing lines. I googled a bit and found finished
>> c-code for a Bresenham-line in the wikipedia, I adopted this code into my
>> C++ class (original code is the same, except that that the function is
>> embedded in a class and putpixel is now this->putpixel).
> 
> Any particular reason you don't want to use openGL? If not, then you
> can just use gl functions to draw a line and be done with it :)

There is no particular reason for that, except, I didnt know that OGL can
do that :-) On the other side, I wanted to keep requirements low. It is
hard to justify the requirement of a state of the art PC for a turnbased
strategy game with simple 2 dimensional linedrawings and some text...

Or is OGL not screwing requirements like this?

TIA
Norbert



More information about the SDL mailing list