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_Context.h')
-rw-r--r--intern/ghost/intern/GHOST_Context.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/intern/ghost/intern/GHOST_Context.h b/intern/ghost/intern/GHOST_Context.h
index 18d36c40e9c..670b86d456f 100644
--- a/intern/ghost/intern/GHOST_Context.h
+++ b/intern/ghost/intern/GHOST_Context.h
@@ -33,6 +33,7 @@
#ifndef __GHOST_CONTEXT_H__
#define __GHOST_CONTEXT_H__
+#include "GHOST_IContext.h"
#include "GHOST_Types.h"
#include "glew-mx.h"
@@ -40,7 +41,7 @@
#include <cstdlib> // for NULL
-class GHOST_Context
+class GHOST_Context : public GHOST_IContext
{
public:
/**
@@ -50,15 +51,13 @@ public:
*/
GHOST_Context(bool stereoVisual, GHOST_TUns16 numOfAASamples)
: m_stereoVisual(stereoVisual),
- m_numOfAASamples(numOfAASamples),
- m_mxContext(NULL)
+ m_numOfAASamples(numOfAASamples)
{}
/**
* Destructor.
*/
virtual ~GHOST_Context() {
- mxDestroyContext(m_mxContext);
}
/**
@@ -74,6 +73,12 @@ public:
virtual GHOST_TSuccess activateDrawingContext() = 0;
/**
+ * Release the drawing context of the calling thread.
+ * \return A boolean success indicator.
+ */
+ virtual GHOST_TSuccess releaseDrawingContext()= 0;
+
+ /**
* Call immediately after new to initialize. If this fails then immediately delete the object.
* \return Indication as to whether initialization has succeeded.
*/
@@ -128,19 +133,12 @@ public:
protected:
void initContextGLEW();
- inline void activateGLEW() const {
- mxMakeCurrentContext(m_mxContext);
- }
-
bool m_stereoVisual;
GHOST_TUns16 m_numOfAASamples;
static void initClearGL();
-private:
- MXContext *m_mxContext;
-
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_Context")
#endif