[Vala] How to use Game loop style with Glib main loop(for events)?
- From: Tal Hadad <tal_hd hotmail com>
- To: Vala Mail List <vala-list gnome org>
- Subject: [Vala] How to use Game loop style with Glib main loop(for events)?
- Date: Thu, 4 Aug 2011 18:54:02 +0300
In Vala docs(1), it is shown how to render a static display output using OpenGL.
There two general ways which described:
1. Using GLFW/GLUT with a real game loop(re-render always).
2. Using Gtk/X11 for rendering a static visual output(using "exposed" event)
I want my library to support rendering in GtkX11, but it was mentioned not only for "frozen images".
The problem of course is how to integrate with Glib main loop, for two purpose:
1. Receive events and handling them.
2. Non-blocking GUI.(I mean the possibility to have muti- GtkWindow(s))
I know that most game developers finds GLWF/GLUT more appropriate, but my purpose is more global.
I have searched in Google this, and find out people told this person to use SDL. Please don't.
I'm asking this because logically it is possible to process a game Loop with glib main loop.
Does this solution involves running the game loop different thread of the main loop?
(1) http://live.gnome.org/Vala/OpenGLSamples
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]