From 8d084e8c8f48dd2f07d4a3fbd4a941a7bcc0dcfb Mon Sep 17 00:00:00 2001 From: Jason Wilkins Date: Tue, 7 Oct 2014 15:46:19 -0500 Subject: Ghost Context Refactor https://developer.blender.org/D643 Separates graphics context creation from window code in Ghost so that they can vary separately. --- source/blender/python/SConscript | 7 ++++--- source/blender/python/generic/CMakeLists.txt | 4 +++- source/blender/python/generic/bgl.c | 2 +- source/blender/python/intern/CMakeLists.txt | 1 + 4 files changed, 9 insertions(+), 5 deletions(-) (limited to 'source/blender/python') diff --git a/source/blender/python/SConscript b/source/blender/python/SConscript index a5b52a3dd63..9988e0981aa 100644 --- a/source/blender/python/SConscript +++ b/source/blender/python/SConscript @@ -33,7 +33,8 @@ incs = [ '.', '#/intern/guardedalloc', '#/intern/memutil', - '#/extern/glew/include', + env['BF_GLEW_INC'], + '#/intern/glew-mx', '#/intern/audaspace/intern', '#/intern/cycles/blender', '../blenfont', @@ -62,7 +63,7 @@ sources = env.Glob('bmesh/*.c') env.BlenderLib( libname = 'bf_python_bmesh', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core','player'], priority = [362,165]) # generic -defs = ['GLEW_STATIC'] +defs = env['BF_GL_DEFINITIONS'] if is_debug: defs.append('_DEBUG') @@ -79,7 +80,7 @@ env.BlenderLib( libname = 'bf_python_mathutils', sources = Split(sources), inclu # bpy -defs = [] +defs = env['BF_GL_DEFINITIONS'] if is_debug: defs.append('_DEBUG') diff --git a/source/blender/python/generic/CMakeLists.txt b/source/blender/python/generic/CMakeLists.txt index aec2faa89e6..155247a4249 100644 --- a/source/blender/python/generic/CMakeLists.txt +++ b/source/blender/python/generic/CMakeLists.txt @@ -22,8 +22,10 @@ set(INC . ../../blenkernel ../../blenlib + ../../gpu ../../makesdna ../../../../intern/guardedalloc + ../../../../intern/glew-mx ) set(INC_SYS @@ -46,6 +48,6 @@ set(SRC py_capi_utils.h ) -add_definitions(-DGLEW_STATIC) +add_definitions(${GL_DEFINITIONS}) blender_add_lib(bf_python_ext "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c index b8dcf9d8491..c599ce26f6c 100644 --- a/source/blender/python/generic/bgl.c +++ b/source/blender/python/generic/bgl.c @@ -33,7 +33,7 @@ #include #include "bgl.h" /*This must come first */ -#include +#include "GPU_glew.h" #include "MEM_guardedalloc.h" #include "BLI_utildefines.h" diff --git a/source/blender/python/intern/CMakeLists.txt b/source/blender/python/intern/CMakeLists.txt index 70b4df7d6fe..a75db23d20b 100644 --- a/source/blender/python/intern/CMakeLists.txt +++ b/source/blender/python/intern/CMakeLists.txt @@ -260,5 +260,6 @@ if(WITH_PLAYER) add_definitions(-DWITH_PLAYER) endif() +add_definitions(${GL_DEFINITIONS}) blender_add_lib(bf_python "${SRC}" "${INC}" "${INC_SYS}") -- cgit v1.2.3