basiliscos has asked for the wisdom of the Perl Monks concerning the following question:
Hello dear monks!
I'm developing an application using OpenGL. I need some kind of asynchronous behaviour, i.e. when some graphical objects are moving, it should be possible that another events occur.
The common way of writing OpenGL code is to enter to OpenGL/GLUT event loop via: glutMainLoop. Good! But how could I manage schedule-based world mechanics then? I tried to use AnyEvent, but it seems, that simple code like:
my $t; $t = AE::timer 1, 0, sub{ say "Hi!"; undef $t" }
Isn't working, when it enters into glutMainLoop. What can I do to make AE work? (OpenGL backend isn't listed among the available AE backends).
Thanks for any help!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: OpenGL and AnyEvent
by zentara (Cardinal) on May 29, 2014 at 12:32 UTC | |
|
Re: OpenGL and AnyEvent
by Corion (Patriarch) on May 29, 2014 at 11:21 UTC | |
by basiliscos (Pilgrim) on May 29, 2014 at 12:34 UTC |