Polygon and Color

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Jonix

Polygon and Color

Post by Jonix »

Hello to all,

I want to render a polygon (unknown number of edges;). Therefore I am currently using draw3DLine(...). That works without any problems. But I've got a problem, since I want to paint "into" the polygone. With different colors fore each pixel....

has anyone an idea, how i should do this...
x4861
Posts: 24
Joined: Fri Feb 18, 2005 10:19 am

Post by x4861 »

There are ways to triangulate your polygon and draw it as a set of triangles. If your polygon is convex, it is very simple:
Image

Otherwise you can look at following page:
http://www.vterrain.org/Implementation/ ... ulate.html
Post Reply