I just figured out how to do it. My book was talking about rasterization of polygons. Though it does some complicated stuff with vectors and matricies. I didn't figure out how to do it the way the book said, but the chapter/section on culling did lead me to a question. Which in turn, led me to an idea of filling a triangle by sweeping a line. Unfortunately, my design only works if the 2nd point is to the left of the 3rd (By the nature of the For loops).
So are there better ways, and ways that don't leave holes at the edges?
And what is the deffinition of rasterization. The book says everything about rasterization except the definition.
For any grievances posted above, I blame whoever is in charge . . .
I can't remember the proper syntax of PAINT, but I once did it with it by painting in the centre of the triangle:
PAINT(width/2, height/2), fillcolor, bordercolour.
Rasterization or rasterisation is the task of taking an image described in a vector graphics format (shapes) and converting it into a raster image (pixels or dots) for output on a video display or printer.
If you scroll a bit down, to: 'III. Different Polygon fillers', there is MUCH info on how to make polygon fillers. Solid, but also with interpolating colours, and even environment mapped polygons.
Also look on Petesqbsite > tutorials > Graphics, then look at some of the 3d series (the link I sended you is that from Relsoft).
Mentat wrote:Ohhhhhhh. I thought OpenGL was just for C++.
Hehe, of course not. The headers use procedural prototypes anyways, so any compiler that can link the libraries and pass arguments using the correct convention can use OpenGL. Hell, I use OpenGL on the Nintendo DS.