Hello,
I’m quite an OpenGL newbie so please bear with me. I’m tying to render 60 vertices. They represent signal strength values on a ground penetrating radar scan. The x and y data makes a regular grid. I want the vertices color to represent signal strength. I have code that is plotting the points at the desired locations in the proper color.
What I want to do now, is connect all the points with smooth colors, so that I have a solid surface. I’ve been working with GL_QUADS, but I suspect that I’m sending the vertex data incorrectly, because I’m getting very strange results.
Here’s a code snippet:
glBegin(GL_QUAD_STRIP);
for(i=0;i<60;i++){
if(vertex[i].data == 173)
glColor3f(1.0,1.0,1.0);
else if(vertex[i].data == 174)
glColor3f(1.0,0.0,0.0);
else if(vertex[i].data == 175)
glColor3f(0.0,1.0,0.0);
else if(vertex[i].data == 176)
glColor3f(0.0,0.0,1.0);
else if(vertex[1].data == 177)
glColor3f(1.0,0.0,1.0);
glVertex2f(vertex[i].x,vertex[i].y);
}
glEnd();
Any suggestions?