From 626a287c893c0c7827bc2a665399207140055199 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Thu, 2 Jul 2015 20:06:02 +0200 Subject: [PATCH] Support debug contexts on win32 --- intern/ghost/intern/GHOST_SystemWin32.cpp | 3 ++- intern/ghost/intern/GHOST_WindowWin32.cpp | 6 ++++-- intern/ghost/intern/GHOST_WindowWin32.h | 8 ++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index 46ed8bbe1fc..4f3b1127a18 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -243,7 +243,8 @@ GHOST_IWindow *GHOST_SystemWin32::createWindow( ((glSettings.flags & GHOST_glStereoVisual) != 0), ((glSettings.flags & GHOST_glWarnSupport) != 0), glSettings.numOfAASamples, - parentWindow); + parentWindow, + ((glSettings.flags & GHOST_glDebugContext) != 0)); if (window->getValid()) { // Store the pointer to the window diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index efcb389363d..54689a96b66 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -72,7 +72,8 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system, GHOST_TDrawingContextType type, bool wantStereoVisual, bool warnOld, GHOST_TUns16 wantNumOfAASamples, - GHOST_TEmbedderWindowID parentwindowhwnd) + GHOST_TEmbedderWindowID parentwindowhwnd, + bool is_debug) : GHOST_Window(width, height, state, wantStereoVisual, false, wantNumOfAASamples), m_inLiveResize(false), @@ -87,7 +88,8 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system, m_tablet(0), m_maxPressure(0), m_normal_state(GHOST_kWindowStateNormal), - m_parentWindowHwnd(parentwindowhwnd) + m_parentWindowHwnd(parentwindowhwnd), + m_debug_context(is_debug) { OSVERSIONINFOEX versionInfo; bool hasMinVersionForTaskbar = false; diff --git a/intern/ghost/intern/GHOST_WindowWin32.h b/intern/ghost/intern/GHOST_WindowWin32.h index 3a9b1529a8b..3666fa753f3 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.h +++ b/intern/ghost/intern/GHOST_WindowWin32.h @@ -80,8 +80,7 @@ public: * \param wantNumOfAASamples Number of samples used for AA (zero if no AA) * \param parentWindowHwnd */ - GHOST_WindowWin32( - GHOST_SystemWin32 *system, + GHOST_WindowWin32(GHOST_SystemWin32 *system, const STR_String& title, GHOST_TInt32 left, GHOST_TInt32 top, @@ -92,8 +91,8 @@ public: bool wantStereoVisual = false, bool warnOld = false, GHOST_TUns16 wantNumOfAASamples = 0, - GHOST_TEmbedderWindowID parentWindowHwnd = 0 - ); + GHOST_TEmbedderWindowID parentWindowHwnd = 0, + bool is_debug = false); /** * Destructor. @@ -357,6 +356,7 @@ private: /** Handle input method editors event */ GHOST_ImeWin32 m_imeImput; #endif + bool m_debug_context; }; #endif // __GHOST_WINDOWWIN32_H__