I have written an application using GLUT which displays an object in 3D space, illuminated and rendered correctly.
I would like the object to be oriented depending upon some data which will be transmitted to the routine regularly by UDP on ethernet. I have a function which will read data from the UDP port when called.
I would like to know how to reqister a callback to get the program to read data either every time a new packet arrives, or at a fixed interval.
also the UDP monitor should have a variable declared to hold the address of the callback function:
int (NewUDPData)(BYTE NewData)
When your OpenGL code calls RegisterCallback with the address of its own function for handling incoming UDP data, RegisterCallback should store the address as follows: