View Full Version : Vertex Color Ranges
07-09-2004, 09:56 PM
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.
WHAT I HAVE:
WHAT I WOULD LIKE:
07-09-2004, 11:11 PM
07-10-2004, 08:09 AM
Weird, it doesnt show them unless u right click, show picture. Sorry about that...
07-10-2004, 10:35 AM
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.
07-10-2004, 10:38 AM
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.
07-10-2004, 09:11 PM
My goal is to allow a user to see what vertex he/she are about to select, and what vertex has already been selected...
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.