From 8bcac27c10064e36be2b351f9f764412fceaa1ff Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Fri, 24 Feb 2017 21:58:09 -1000 Subject: [PATCH] Fix updated glew for Windows --- include/boo/graphicsdev/glew.h | 2 ++ lib/graphicsdev/glew.c | 4 ++-- lib/win/ApplicationWin32.cpp | 1 + lib/x11/ApplicationXlib.hpp | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/boo/graphicsdev/glew.h b/include/boo/graphicsdev/glew.h index 8ec14a0..2c4e841 100644 --- a/include/boo/graphicsdev/glew.h +++ b/include/boo/graphicsdev/glew.h @@ -81,6 +81,8 @@ #define __glew_h__ #define __GLEW_H__ +#define GLEW_STATIC + #if defined(__gl_h_) || defined(__GL_H__) || defined(_GL_H) || defined(__X_GL_H) #error gl.h included before glew.h #endif diff --git a/lib/graphicsdev/glew.c b/lib/graphicsdev/glew.c index b45aaab..6ad87c4 100644 --- a/lib/graphicsdev/glew.c +++ b/lib/graphicsdev/glew.c @@ -38,9 +38,9 @@ #elif defined(GLEW_EGL) # include #elif defined(_WIN32) -# include +# include "boo/graphicsdev/wglew.h" #elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) -# include +# include "boo/graphicsdev/glxew.h" #endif #include /* For size_t */ diff --git a/lib/win/ApplicationWin32.cpp b/lib/win/ApplicationWin32.cpp index a28c2a0..f4ee81c 100644 --- a/lib/win/ApplicationWin32.cpp +++ b/lib/win/ApplicationWin32.cpp @@ -362,6 +362,7 @@ public: int clientReturn = 0; std::thread clientThread([&]() { + logvisor::RegisterThreadName("Boo Client Thread"); CoInitializeEx(nullptr, COINIT_MULTITHREADED | COINIT_DISABLE_OLE1DDE); clientReturn = m_callback.appMain(this); PostThreadMessage(g_mainThreadId, WM_USER+1, 0, 0); diff --git a/lib/x11/ApplicationXlib.hpp b/lib/x11/ApplicationXlib.hpp index 71b1681..eb95295 100644 --- a/lib/x11/ApplicationXlib.hpp +++ b/lib/x11/ApplicationXlib.hpp @@ -433,6 +433,7 @@ public: std::unique_lock innerLk(initmt); innerLk.unlock(); initcv.notify_one(); + logvisor::RegisterThreadName("Boo Client Thread"); clientReturn = m_callback.appMain(this); pthread_kill(mainThread, SIGUSR2); });