My application needs to move an object on the dislay in real time. The location of the object comes from another process.
My understanding is that I need to create a child process which receives the location messages via a socket and then passes them to the parent process, ie. auxMainLoop(), via a pipe. But how do I register the file input for the parent process?
Why not just create a socket in the parent process instead of going through the trouble of going through the child process?
There are also a number of other ways to do interprocess communication. Message queues, database polling, etc. And if both processes are on the same computer, there are even more ways…
Sockets are probably one of the most common ways, but depending on your needs one of the other methods might be more suitable.
Yes, I should just need to create a socket in the main porgram. But how do I register the socket input so that the program can reponse to it? What functions should the main program call?
That isn’t really an OpenGL topic, and though sockets are fairly simple once you understand the basics of them, they do take a bit more understanding than I want to go into right now. You should do some research on them and decide if you want to use UDP or TCP sockets. If you still have questions after you’ve done a bit of research on them, feel free to e-mail me with questions and I’d be glad to help.