PDA

View Full Version : Receive x,y data from socket continuously and plot



rakes
02-09-2012, 03:44 AM
dear friends,

i m new to openGL. i receive (x,y,z) over LAN continuously. i have to plot them. after one cycle the new (x,y,z) should be ploted and old (x,y,z) should fade.

can anyone provide outline/sample code to quickly start with. :(

rakes
02-09-2012, 03:46 AM
also there are around 1000 3d points(x,y,z), to be plotted in each cycle.

V-man
02-09-2012, 06:14 AM
Collect the data and store them in a array.
Then render the points

glBegin(GL_POINTS)
for loop
{
glVertex3f(x, y, z)
}
glEnd()

The above is old GL.
With GL 1.5 and higher, use VBO.
Have a look at the Wiki for VBO.