Dear all,
I am using openGL in multithreading application.
In this I am registering one function with glutDisplayFunc() which is usefull for displaying video and here I am accessing global variables. But in my application global variables should not use.
Instead of global variables is it possible to pass the arguments through callback registering to the callback function?
You can use the singleton design pattern. It have the same effect of global variables, but if used correctly, should produce better code to understand.