PDA

View Full Version : gradients



lakgani
04-25-2008, 04:44 AM
hi..

Can anybody tell me how to apply color gradients to objects in opengl??

Dark Photon
04-25-2008, 06:11 AM
Can anybody tell me how to apply color gradients to objects in opengl??
Could you define what you mean by gradients?

You can set different colors on vertices of a surface, and have the hardware blend between them as it fills the triangles. You can also use texturing to do color gradients across surfaces.

lakgani
04-25-2008, 06:36 AM
gradients are special type of fills for shapes that create ramp of colors that interpolate between two or more fixed colors.

can u send sample code if any??

Mark Shaxted
04-25-2008, 08:23 AM
Try here

http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=03