View Full Version : Problem with sending data into display function
10-17-2005, 01:07 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, 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:
10-17-2005, 06:14 AM
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 ;)
10-17-2005, 10:32 AM
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.