Problem with sending data into display function

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, in display,how can i send the data into it?
noted:display function is a void(void) function which means we can not send data into it directly. :confused:

You can’t give it a parameter.

You could use a global variable or the Singleton design pattern for getting data into the display function. Or you could just use some other windowing toolkit, like SDL, or use the native interface of your windowing system (wgl/glX). Then you can give the draw function any parameter you like :wink: