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:
authorMike Erwin <significant.bit@gmail.com>2017-04-22 07:35:04 +0300
committerMike Erwin <significant.bit@gmail.com>2017-04-22 07:35:04 +0300
commitef640ecf1004f7af9cfde09f5ce1cde2fb70747f (patch)
tree0fdf4cc76d005848fee55c5217af1114e45d1607 /intern/glew-mx
parent1beed61b761d3f964f57f99235c479ff1ddfe26f (diff)
OpenGL: remove use of GLEW MX
MX (Multiple conteXt) support was dropped from the GLEW 2.0 library to make core profile support cleaner. Our WITH_GLEW_MX build option was OFF by default already; this commit removes the inactive code paths. I'm working on a plan for multiple GPUs, contexts, resource sharing, etc. This commit gives us a cleaner starting point for that upcoming work. Tested on Mac, will test on Linux & Windows immediately after pushing.
Diffstat (limited to 'intern/glew-mx')
-rw-r--r--intern/glew-mx/glew-mx.h29
-rw-r--r--intern/glew-mx/intern/glew-mx.c58
2 files changed, 0 insertions, 87 deletions
diff --git a/intern/glew-mx/glew-mx.h b/intern/glew-mx/glew-mx.h
index 813e95958b5..86f48a1068d 100644
--- a/intern/glew-mx/glew-mx.h
+++ b/intern/glew-mx/glew-mx.h
@@ -49,12 +49,6 @@
#ifndef __GLEW_MX_H__
#define __GLEW_MX_H__
-#ifdef WITH_GLEW_MX
-/* glew itself expects this */
-# define GLEW_MX 1
-# define glewGetContext() (&(_mx_context->glew_context))
-#endif
-
#include <GL/glew.h>
@@ -62,23 +56,6 @@
extern "C" {
#endif
-/* MXContext is used instead of GLEWContext directly so that
- extending what data is held by a context is easier.
- */
-typedef struct MXContext {
-#ifdef WITH_GLEW_MX
- GLEWContext glew_context;
-#endif
-
- int reserved; /* structs need at least one member */
-
-} MXContext;
-
-#ifdef WITH_GLEW_MX
-extern MXContext *_mx_context;
-#endif
-
-
#include "intern/symbol-binding.h"
@@ -89,12 +66,6 @@ extern MXContext *_mx_context;
# include "intern/gl-deprecated.h"
#endif
-
-MXContext *mxCreateContext (void);
-MXContext *mxGetCurrentContext (void);
-void mxMakeCurrentContext(MXContext *ctx);
-void mxDestroyContext (MXContext *ctx);
-
GLenum glew_chk(GLenum error, const char *file, int line, const char *text);
#ifndef NDEBUG
diff --git a/intern/glew-mx/intern/glew-mx.c b/intern/glew-mx/intern/glew-mx.c
index 6fbb1a7a2e2..9db2d233085 100644
--- a/intern/glew-mx/intern/glew-mx.c
+++ b/intern/glew-mx/intern/glew-mx.c
@@ -84,61 +84,3 @@ GLenum glew_chk(GLenum error, const char *file, int line, const char *text)
return error;
}
-
-
-#ifdef WITH_GLEW_MX
-MXContext *_mx_context = NULL;
-#endif
-
-
-MXContext *mxCreateContext(void)
-{
-#ifdef WITH_GLEW_MX
- MXContext* new_ctx = calloc(1, sizeof(MXContext));
-
- if (new_ctx != NULL) {
- MXContext* cur_ctx = _mx_context;
- _mx_context = new_ctx;
- GLEW_CHK(glewInit());
- _mx_context = cur_ctx;
- }
-
- return new_ctx;
-#else
- GLEW_CHK(glewInit());
- return NULL;
-#endif
-}
-
-
-MXContext *mxGetCurrentContext(void)
-{
-#ifdef WITH_GLEW_MX
- return _mx_context;
-#else
- return NULL;
-#endif
-}
-
-
-void mxMakeCurrentContext(MXContext *ctx)
-{
-#ifdef WITH_GLEW_MX
- _mx_context = ctx;
-#else
- (void)ctx;
-#endif
-}
-
-
-void mxDestroyContext(MXContext *ctx)
-{
-#ifdef WITH_GLEW_MX
- if (_mx_context == ctx)
- _mx_context = NULL;
-
- free(ctx);
-#else
- (void)ctx;
-#endif
-}