Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/ghost/intern/GHOST_ContextWGL.h')
-rw-r--r--intern/ghost/intern/GHOST_ContextWGL.h37
1 files changed, 8 insertions, 29 deletions
diff --git a/intern/ghost/intern/GHOST_ContextWGL.h b/intern/ghost/intern/GHOST_ContextWGL.h
index 6289c41f561..7711f90a9e9 100644
--- a/intern/ghost/intern/GHOST_ContextWGL.h
+++ b/intern/ghost/intern/GHOST_ContextWGL.h
@@ -36,24 +36,8 @@
#include "GHOST_Context.h"
-#ifdef WITH_GLEW_MX
-#define wglewGetContext() wglewContext
-#endif
-
#include <GL/wglew.h>
-#ifdef WITH_GLEW_MX
-extern "C" WGLEWContext *wglewContext;
-#endif
-
-#ifndef GHOST_OPENGL_WGL_CONTEXT_FLAGS
-# ifdef WITH_GPU_DEBUG
-# define GHOST_OPENGL_WGL_CONTEXT_FLAGS WGL_CONTEXT_DEBUG_BIT_ARB
-# else
-# define GHOST_OPENGL_WGL_CONTEXT_FLAGS 0
-# endif
-#endif
-
#ifndef GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY
#define GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY 0
#endif
@@ -95,6 +79,12 @@ public:
GHOST_TSuccess activateDrawingContext();
/**
+ * Release the drawing context of the calling thread.
+ * \return A boolean success indicator.
+ */
+ GHOST_TSuccess releaseDrawingContext();
+
+ /**
* Call immediately after new to initialize. If this fails then immediately delete the object.
* \return Indication as to whether initialization has succeeded.
*/
@@ -121,13 +111,6 @@ public:
*/
GHOST_TSuccess getSwapInterval(int &intervalOut);
-protected:
- inline void activateWGLEW() const {
-#ifdef WITH_GLEW_MX
- wglewContext = m_wglewContext;
-#endif
- }
-
private:
int choose_pixel_format(
bool stereoVisual,
@@ -157,11 +140,13 @@ private:
bool needStencil,
bool sRGB,
int swapMethod);
+ GHOST_TSuccess initContext();
void initContextWGLEW(PIXELFORMATDESCRIPTOR &preferredPFD);
HWND m_hWnd;
HDC m_hDC;
+ bool m_init;
const int m_contextProfileMask;
const int m_contextMajorVersion;
@@ -172,10 +157,6 @@ private:
HGLRC m_hGLRC;
-#ifdef WITH_GLEW_MX
- WGLEWContext *m_wglewContext;
-#endif
-
#ifndef NDEBUG
const char *m_dummyVendor;
const char *m_dummyRenderer;
@@ -184,8 +165,6 @@ private:
static HGLRC s_sharedHGLRC;
static int s_sharedCount;
-
- static bool s_singleContextMode;
};
#endif // __GHOST_CONTEXTWGL_H__