PDA

View Full Version : Coloring objects



nithya
08-05-2003, 08:31 PM
hi,
if an object is drawn using the primitives - line or line loop - how will we color it? is there any option ?
can we draw a border for a filled region?

mikael_aronsson
08-05-2003, 09:13 PM
Hi !

If you don't have lighting enabled then you can just use one of the glColor... functions.

If you have lighting enabled you can for example use the glMaterialfv function.

If you draw filled region the border is always in the same colors as the filled area, but you can draw a filled shape first and then the border (becomes a little more tricky if you have depth testing enabled).

Mikael