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_ContextGLX.h')
-rw-r--r--intern/ghost/intern/GHOST_ContextGLX.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/intern/ghost/intern/GHOST_ContextGLX.h b/intern/ghost/intern/GHOST_ContextGLX.h
index d32adf3338d..b33c0b5252a 100644
--- a/intern/ghost/intern/GHOST_ContextGLX.h
+++ b/intern/ghost/intern/GHOST_ContextGLX.h
@@ -46,7 +46,11 @@ extern "C" GLXEWContext *glxewContext;
#ifndef GHOST_OPENGL_GLX_CONTEXT_FLAGS
-#define GHOST_OPENGL_GLX_CONTEXT_FLAGS 0
+# ifdef WITH_GPU_DEBUG
+# define GHOST_OPENGL_GLX_CONTEXT_FLAGS GLX_CONTEXT_DEBUG_BIT_ARB
+# else
+# define GHOST_OPENGL_GLX_CONTEXT_FLAGS 0
+# endif
#endif
#ifndef GHOST_OPENGL_GLX_RESET_NOTIFICATION_STRATEGY
@@ -65,6 +69,7 @@ public:
GHOST_TUns16 numOfAASamples,
Window window,
Display *display,
+ XVisualInfo *visualInfo,
int contextProfileMask,
int contextMajorVersion,
int contextMinorVersion,
@@ -74,46 +79,46 @@ public:
/**
* Destructor.
*/
- virtual ~GHOST_ContextGLX();
+ ~GHOST_ContextGLX();
/**
* Swaps front and back buffers of a window.
* \return A boolean success indicator.
*/
- virtual GHOST_TSuccess swapBuffers();
+ GHOST_TSuccess swapBuffers();
/**
* Activates the drawing context of this window.
* \return A boolean success indicator.
*/
- virtual GHOST_TSuccess activateDrawingContext();
+ GHOST_TSuccess activateDrawingContext();
/**
* Call immediately after new to initialize. If this fails then immediately delete the object.
* \return Indication as to whether initialization has succeeded.
*/
- virtual GHOST_TSuccess initializeDrawingContext();
+ GHOST_TSuccess initializeDrawingContext();
/**
* Removes references to native handles from this context and then returns
* \return GHOST_kSuccess if it is OK for the parent to release the handles and
* GHOST_kFailure if releasing the handles will interfere with sharing
*/
- virtual GHOST_TSuccess releaseNativeHandles();
+ GHOST_TSuccess releaseNativeHandles();
/**
* Sets the swap interval for swapBuffers.
* \param interval The swap interval to use.
* \return A boolean success indicator.
*/
- virtual GHOST_TSuccess setSwapInterval(int interval);
+ GHOST_TSuccess setSwapInterval(int interval);
/**
* Gets the current swap interval for swapBuffers.
* \param intervalOut Variable to store the swap interval if it can be read.
* \return Whether the swap interval can be read.
*/
- virtual GHOST_TSuccess getSwapInterval(int &intervalOut);
+ GHOST_TSuccess getSwapInterval(int &intervalOut);
protected:
inline void activateGLXEW() const {
@@ -126,6 +131,7 @@ private:
void initContextGLXEW();
Display *m_display;
+ XVisualInfo *m_visualInfo;
Window m_window;
const int m_contextProfileMask;
@@ -134,8 +140,6 @@ private:
const int m_contextFlags;
const int m_contextResetNotificationStrategy;
- XVisualInfo *m_visualInfo;
-
GLXContext m_context;
#ifdef WITH_GLEW_MX