View Full Version : OpenGL with networks/sockets

03-20-2012, 01:28 PM
Im looking to send data from iphone app to desktop OpenGL application using sockets connection. e.g. location of texture,

I have the opengl application running on desktop. And a separate socket application for desktop and iphone where I can send/recieve the data.

But I'm not sure how to combine the sockets application and opengl application for desktop. The desktop opengl application can only recieve data once, and then it gets into glutMainLoop().

could you please advise?

03-21-2012, 12:01 AM
You can still receive data from a glut idle func or even display func.

What is the "rhythm" you need ? Synchronized drawing and receiving data ? Or something asynchronous, ie. sometimes receive new data, draw frequently at 60 Hz ?

03-21-2012, 07:43 AM
it's asynchronous, I'm just looking to send data from iphone app.

Could you please direct me to examples of glutIdle() function?

03-21-2012, 09:39 AM

Same as display func, difference is that it is called when glut has nothing else to do (no display events, no input events, no window events etc)