Original Post
just wrote a method for line clipping but it is mammoth. :( what i have done is take 2 pairs of points(x,y) lineStart and lineEnd and found what region they are in. there are 8 regions. 1. x < 0 2. x >= screenwidth 3. y < 0 4 y >= screenheight 5. (1) and (3) 6. (2) and (3) 7. (1) and (4) 8. (2) and (4) i then do a switch() on each point and perform clipping as per region. does anyone have a faster method for doing this rather than having 2 massive switch() statements? i am looking for speed too as this is for a software rasterization engine. thanks.