void RenderHeightMap()
{
int X, Y, Z;
string line;
glBegin( GL_POINTS );
ifstream myfile ("map.txt");
if(myfile.is_open()){
while(!myfile.eof()){
for(X = 0; X < MAP_SIZE; X += STEP_SIZE)
for(Z = 0; Z < MAP_SIZE; Z += STEP_SIZE)
{
getline(myfile,line);
Y = atoi(line.c_str());
glVertex3i(X, Y, Z);
}
myfile.close();
}
}
glEnd();
}
Ive been confused about this a long time already. If you go look at the attackment you will see the problem, it draws the map like it should do, but it also draws a flat bottom, and i cant find out why it happens.

New Topic/Question
Reply




MultiQuote





|