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:
authorJason Wilkins <Jason.A.Wilkins@gmail.com>2014-10-08 00:46:19 +0400
committerJason Wilkins <Jason.A.Wilkins@gmail.com>2014-10-08 00:47:32 +0400
commit8d084e8c8f48dd2f07d4a3fbd4a941a7bcc0dcfb (patch)
tree5bf15f4f74f3e5a307cfa3f734b2cd086dca69bd /intern/cycles/util
parenta8705e99ee8ec9de2f25c3bac1e9895c2f98c224 (diff)
Ghost Context Refactor
https://developer.blender.org/D643 Separates graphics context creation from window code in Ghost so that they can vary separately.
Diffstat (limited to 'intern/cycles/util')
-rw-r--r--intern/cycles/util/CMakeLists.txt4
-rw-r--r--intern/cycles/util/util_opengl.h3
-rw-r--r--intern/cycles/util/util_view.cpp2
3 files changed, 5 insertions, 4 deletions
diff --git a/intern/cycles/util/CMakeLists.txt b/intern/cycles/util/CMakeLists.txt
index 6120e7e8456..842d5efac79 100644
--- a/intern/cycles/util/CMakeLists.txt
+++ b/intern/cycles/util/CMakeLists.txt
@@ -1,11 +1,11 @@
set(INC
.
+ ../../glew-mx
)
set(INC_SYS
${GLEW_INCLUDE_PATH}
- ${OPENGL_INCLUDE_DIR}
)
set(SRC
@@ -71,4 +71,6 @@ set(SRC_HEADERS
include_directories(${INC})
include_directories(SYSTEM ${INC_SYS})
+add_definitions(${GL_DEFINITIONS})
+
add_library(cycles_util ${SRC} ${SRC_HEADERS})
diff --git a/intern/cycles/util/util_opengl.h b/intern/cycles/util/util_opengl.h
index 04a3e039c9d..667a5db653d 100644
--- a/intern/cycles/util/util_opengl.h
+++ b/intern/cycles/util/util_opengl.h
@@ -20,7 +20,6 @@
/* OpenGL header includes, used everywhere we use OpenGL, to deal with
* platform differences in one central place. */
-#include <GL/glew.h>
+#include "glew-mx.h"
#endif /* __UTIL_OPENGL_H__ */
-
diff --git a/intern/cycles/util/util_view.cpp b/intern/cycles/util/util_view.cpp
index 6bf9c9ed8c0..fe08389fe3f 100644
--- a/intern/cycles/util/util_view.cpp
+++ b/intern/cycles/util/util_view.cpp
@@ -248,7 +248,7 @@ void view_main_loop(const char *title, int width, int height,
glutInitDisplayMode(GLUT_RGB|GLUT_DOUBLE|GLUT_DEPTH);
glutCreateWindow(title);
- glewInit();
+ mxMakeCurrentContext(mxCreateContext());
view_reshape(width, height);