Vertex Color Ranges

Ok, lets say I have a vertex. Coordinate doesnt matter. And for that vertex I specify an RGB color value. Say, glColor3f(1.0f, 0.0f, 0.0f);
After i run the program, all my polygons (in fill mode) have some of that color on them.

Look here:

WHAT I HAVE:

WHAT I WOULD LIKE:

Thanx.

Regards,
Vasko

Pictures… ?

Weird, it doesnt show them unless u right click, show picture. Sorry about that…

Regards,
Vasko

nevermind, I figured it out. I just made a loop, which cycles through my vertex array, and redraws each vertex with different glPointSize, and color.

Vasko

What do you want to do with this red dot ?
Vertex colors are linearly interpolated along triangles edges.
If you really want only vertex colors, you have to change your grid. Make the 4 red vertices on a small square at center, with very near white vertices to limit the gradient. I suggest doing tests with
glPolygonMode( GL_FRONT_AND_BACK,GL_LINE); to better see the tesselation.

Or else scrap your polygon vertex colors, and only draw a single GL_POINTS red vertice, at the appropriate size.

By the way, what is your high level goal actually ?

EDIT: ok, you already figured it yourself.

My goal is to allow a user to see what vertex he/she are about to select, and what vertex has already been selected…