Thanks in advance,
Vijay
void MyDisplayFunc(int Myarg)
{
...
glutSwap...
}
void display()
{
MyDisplayFunc(MyArg);
}
glutDisplayFunc(display);
is it what you want ?
"Vijay" <vde...@me.iitb.ac.in> wrote in message
news:b0119feb.02041...@posting.google.com...
Else you have to load a context var in glut and pass it.
I think you are objecting to having lots of global/static vars clutting up
your name space.
You can do it cleanly with a single static pointer you load with the context
frame for when you run display.
You can clear the pointer to refresh your context when you start building
your scene before your display,
or build it while you display...
dB
"Mehdi Berrada" <mehd...@wanadoo.fr> wrote in message
news:a9aoua$he$1...@wanadoo.fr...
"Mehdi Berrada" <mehd...@wanadoo.fr> wrote in message news:<a9aoua$he$1...@wanadoo.fr>...
If you really are desperate to avoid global variables,
perhaps you can modify GLUT to do what you want. The
source code is readily available.
You could also use some form of IPC to communicate from
your main() to your display function (shared memory, a
socket, etc.) Seems like a lot of trouble for little
gain, however.
HTH
Vijay (vde...@me.iitb.ac.in) wrote:
: Hi All,
: Thanks in advance,
: Vijay
--
Geoff
And how do you want to pass the value through this
parameter to the function? I mean, from where?
Are you really sure this is what you want?
J.O.
--
Jens Olav Nygaard, Research Scientist
SINTEF Applied Mathematics, Geometric Modelling