Support debug contexts on win32

This commit is contained in:
Antonis Ryakiotakis 2015-07-02 20:06:02 +02:00
parent 00808eb39a
commit 626a287c89
3 changed files with 10 additions and 7 deletions

View File

@ -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

View File

@ -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;

View File

@ -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__