PDA

View Full Version : how to send my data into display function



suponlyzx
10-17-2005, 12:03 AM
in normal opengl program,we use glutDisplayFunc(display) to draw our pic,but now i want to use my input data,for example,mesh data, into display,how can i send the data to it?
noted:display function is a void(void) function which means we can not send data into it directly. :confused:

Hlz
10-17-2005, 01:00 AM
You register callbacks with glut, so you need to be thinking in terms of receiving messages, not sending them, kinda like the wndproc in Windows receives messages from the OS. Organize your data and functions so that each tick or frame of your application you can set all state necessary to render the next frame.

P.S. Please don't cross post.

suponlyzx
10-17-2005, 09:35 AM
thanks
:)