Click to See Complete Forum and Search --> : OpenGL Line Chart


JohnnyIce
May 22nd, 2006, 08:02 AM
hi

iīve already posted similar question on this site.....

but i have a .txt file with numbers from microcontroller......

the format is:

23
43
12
23

(all numbers in first "row")

i can read the information from the file, but canīt seem to make a line chart
only "pie chart" and "bar chart"....

is there anyone here that has made line chart with OpenGL


thanx
Johnny

Andrea_Rossini
May 26th, 2006, 08:43 AM
Hope it suggests some ideas

glBegin(GL_LINE_STRIP);
glVertex2i(10, 23);
glVertex2i(20, 43);
glVertex2i(30, 12);
glVertex2i(40, 23);
glEnd();

obviously you must setup an ortho projection.