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:
authorCampbell Barton <ideasman42@gmail.com>2015-10-12 07:04:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-10-12 07:08:20 +0300
commit9cea429f787727d8a19b9dfe179a5b7ba2d92fd0 (patch)
tree2b71c91be73e10e91fa566e63ae8c2e8ad7753d1 /intern/glew-mx
parente0c05a1e6ab82b365146b5149cec1dfd89b1cd2f (diff)
Fix T46431: Init glew before glx-context crashes
Initialize glxew before glew, so we can check whats supported before creating the context. This also removes need for mxIgnoreNoVersion.
Diffstat (limited to 'intern/glew-mx')
-rw-r--r--intern/glew-mx/glew-mx.h2
-rw-r--r--intern/glew-mx/intern/glew-mx.c9
2 files changed, 1 insertions, 10 deletions
diff --git a/intern/glew-mx/glew-mx.h b/intern/glew-mx/glew-mx.h
index 92450d67812..ed17ea4a0e6 100644
--- a/intern/glew-mx/glew-mx.h
+++ b/intern/glew-mx/glew-mx.h
@@ -95,8 +95,6 @@ MXContext *mxGetCurrentContext (void);
void mxMakeCurrentContext(MXContext *ctx);
void mxDestroyContext (MXContext *ctx);
-void mxIgnoreNoVersion(int ignore);
-
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 78920670f68..6fbb1a7a2e2 100644
--- a/intern/glew-mx/intern/glew-mx.c
+++ b/intern/glew-mx/intern/glew-mx.c
@@ -34,8 +34,6 @@
#include <stdio.h>
#include <stdlib.h>
-static int ignore_version = 0;
-
#define CASE_CODE_RETURN_STR(code) case code: return #code;
static const char *get_glew_error_enum_string(GLenum error)
@@ -63,7 +61,7 @@ GLenum glew_chk(GLenum error, const char *file, int line, const char *text)
const char *code = get_glew_error_enum_string(error);
const char *msg = (const char *)glewGetErrorString(error);
- if (error == GLEW_ERROR_NO_GL_VERSION && ignore_version)
+ if (error == GLEW_ERROR_NO_GL_VERSION)
return GLEW_OK;
#ifndef NDEBUG
@@ -144,8 +142,3 @@ void mxDestroyContext(MXContext *ctx)
(void)ctx;
#endif
}
-
-void mxIgnoreNoVersion(int ignore)
-{
- ignore_version = ignore;
-}