Hey everyone. I haven’t taken C for about 7 years now and I can’t find any of my books on it.
First of all, I have a data file full of vertices that I need to draw on the screen.
It looks like this
“a1.dat”
0.4606 0.48759
0.47104 0.49414
0.47104 0.49414
0.47108 0.49871
0.47108 0.49871
0.46883 0.50184
0.46883 0.50184
0.464 0.50854
0.464 0.50854
0.45744 0.51764
0.45744 0.51764
0.44479 0.50948
0.4606 0.48759
0.44479 0.50948
0.44479 0.50948
0.45744 0.51764
0.45744 0.51764
0.45454 0.54415
0.45454 0.54415
0.44198 0.53584
and so on and so on
I need it to read from a file instead of manually inserting them myself, since there are thousands of them: IE I DON"T WANT TO DO THIS
glBegin(GL_LINES);
glVertex3f(0.4606,0.48759,0.0);
glVertex3f(0.47104,0.49414,0.0);
glVertex3f(0.47104,0.49414,0.0);
glVertex3f(0.47108,0.49871,0.0);
glVertex3f(0.47108,0.49871,0.0);
glVertex3f(0.46883,0.50184 ,0.0);
glVertex3f(0.46883,0.50184,0.0);
glVertex3f(0.464,0.50854 ,0.0);
I said again that I don’t have any C source books around so I need code! You guys love to do this stuff and I’m in big trouble!