Tag Info

New answers tagged


glOrtho( 0.f, viewWidth, viewHeight, 0.f, 0.f, 1.f ); Assuming that you're starting from an identity matrix, this glOrtho() call will give you a traditional window coordinate system with 0,0 at the top left corner, such that one unit in OpenGL space corresponds exactly to one pixel in the view which contains the OpenGL-rendered image. Man page for glOrtho. ...


You can use the even-odd algorithm. In summary it does the following. Loop thru each scan line Intersect the scan line with each polygon edge Sort the intersection points by x value Fill interior pixels between intersection points using the even-odd rule to determine interior points Note, you have to guard against degenerate cases like intersecting with ...

Top 50 recent answers are included