-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rendering without having the main loop owned by magnum #6
Comments
Hi! One idea would be: while app.exit_requested:
app.main_loop_iteration()
# other stuff But the while not app.exit:
app.main_loop_iteration()
...
if thing: app.exit = 0 # Exit with a success return code ... but that feels to me like not being very intuitive / looking weird, and not following the C++ API at all. Then, what about having while app.main_loop_iteration():
# other stuff Thoughts? :) |
I feel the last one is probably the cleanest solution and this would support the use case nicely. |
Yeah, that's my feeling too :) I'll do the changes and let you know once they hit The |
With mosra/magnum@82f5386 and 7068412 this is now in master :) |
Wow that was fast. Was actually planning to take a stab at this myself today. Thanks a lot for the help! |
Is it possible to have the main loop owned by the python application?
What I would like to do is something like this:
Now this could be achieved by just exposing the
mainLoopIteration
method onSdl2Application
. However, then the python application would have to check for the exit flag and the flags are not exposed outside the application class.Is there a way to do this that I'm overlooking or would this have to be implemented? If this would have to be implemented, what do you feel would be the appropriate way to change the api to support such a use case?
The text was updated successfully, but these errors were encountered: