diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-09-14 22:18:22 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-01-13 22:41:05 +0100 |
commit | 3d85a593bf0812f50f08f4852fae00fdd16fffd8 (patch) | |
tree | 48fa5fd4bd08b75fa9558e5e63e3cf083a2b8f19 /src/menu/application.hpp | |
parent | 82306827bd8c8b7b0a667df48bd95f5c2948c690 (diff) | |
download | usdx-3d85a593bf0812f50f08f4852fae00fdd16fffd8.tar.gz usdx-3d85a593bf0812f50f08f4852fae00fdd16fffd8.tar.xz usdx-3d85a593bf0812f50f08f4852fae00fdd16fffd8.zip |
menu/application: add possibility to query if ogl thread
opengl calls should only executed in the thread, that created the
opengl context. To query whether the current thread is the opengl
thread, the application class stores the current thread id of the
opengl thread after initializing opengl.
Diffstat (limited to 'src/menu/application.hpp')
-rw-r--r-- | src/menu/application.hpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/menu/application.hpp b/src/menu/application.hpp index 9e6ab5c5..78b4e01d 100644 --- a/src/menu/application.hpp +++ b/src/menu/application.hpp @@ -27,6 +27,7 @@ #include <SDL/SDL.h> #include <SDL/SDL_framerate.h> +#include <boost/thread/thread.hpp> #include <log4cpp/Category.hh> #include <list> @@ -55,6 +56,7 @@ namespace usdx * This is the main loop. */ void main_loop(SDL_Surface* display); + boost::thread::id gl_thread; void init_fps_manager(void); @@ -66,6 +68,7 @@ namespace usdx static Application* get_instance(void); static Config* get_config(void); + static bool is_gl_thread(void); void run(void); |