[Bf-blender-cvs] [5f2ce2c] soc-2014-viewport_context: [Ghost Context Refactor] initial commit based on code review of https://developer.blender.org/D643

Jason Wilkins noreply at git.blender.org
Wed Jul 23 03:30:20 CEST 2014


Commit: 5f2ce2cd51a2d07d4131420dee2ea467ca2eaefc
Author: Jason Wilkins
Date:   Tue Jul 22 20:29:44 2014 -0500
Branches: soc-2014-viewport_context
https://developer.blender.org/rB5f2ce2cd51a2d07d4131420dee2ea467ca2eaefc

[Ghost Context Refactor] initial commit based on code review of https://developer.blender.org/D643

===================================================================

M	CMakeLists.txt
A	build_files/cmake/Modules/FindOpenGLES.cmake
M	build_files/cmake/macros.cmake
M	extern/CMakeLists.txt
A	extern/glew-es/CMakeLists.txt
A	extern/glew-es/include/GL/eglew.h
A	extern/glew-es/include/GL/glesew.h
A	extern/glew-es/include/GL/glew.h
A	extern/glew-es/include/GL/glxew.h
A	extern/glew-es/include/GL/wglew.h
A	extern/glew-es/src/glew.c
M	extern/glew/CMakeLists.txt
M	intern/CMakeLists.txt
M	intern/cycles/app/CMakeLists.txt
M	intern/cycles/blender/CMakeLists.txt
M	intern/cycles/cmake/external_libs.cmake
M	intern/cycles/device/CMakeLists.txt
M	intern/cycles/render/CMakeLists.txt
M	intern/cycles/util/CMakeLists.txt
M	intern/cycles/util/util_opengl.h
M	intern/cycles/util/util_view.cpp
M	intern/ghost/CMakeLists.txt
M	intern/ghost/GHOST_C-api.h
M	intern/ghost/GHOST_IWindow.h
M	intern/ghost/intern/GHOST_C-api.cpp
A	intern/ghost/intern/GHOST_Context.cpp
A	intern/ghost/intern/GHOST_Context.h
A	intern/ghost/intern/GHOST_ContextCGL.h
A	intern/ghost/intern/GHOST_ContextCGL.mm
A	intern/ghost/intern/GHOST_ContextEGL.cpp
A	intern/ghost/intern/GHOST_ContextEGL.h
A	intern/ghost/intern/GHOST_ContextGLX.cpp
A	intern/ghost/intern/GHOST_ContextGLX.h
A	intern/ghost/intern/GHOST_ContextNone.cpp
A	intern/ghost/intern/GHOST_ContextNone.h
A	intern/ghost/intern/GHOST_ContextWGL.cpp
A	intern/ghost/intern/GHOST_ContextWGL.h
M	intern/ghost/intern/GHOST_ISystem.cpp
M	intern/ghost/intern/GHOST_SystemCocoa.mm
M	intern/ghost/intern/GHOST_SystemWin32.cpp
M	intern/ghost/intern/GHOST_SystemX11.cpp
M	intern/ghost/intern/GHOST_SystemX11.h
M	intern/ghost/intern/GHOST_Window.cpp
M	intern/ghost/intern/GHOST_Window.h
M	intern/ghost/intern/GHOST_WindowCocoa.h
M	intern/ghost/intern/GHOST_WindowCocoa.mm
M	intern/ghost/intern/GHOST_WindowSDL.cpp
M	intern/ghost/intern/GHOST_WindowSDL.h
M	intern/ghost/intern/GHOST_WindowWin32.cpp
M	intern/ghost/intern/GHOST_WindowWin32.h
M	intern/ghost/intern/GHOST_WindowX11.cpp
M	intern/ghost/intern/GHOST_WindowX11.h
A	intern/glew-mx/CMakeLists.txt
A	intern/glew-mx/glew-mx.h
A	intern/glew-mx/intern/glew-mx.c
M	intern/locale/CMakeLists.txt
M	intern/locale/boost_locale_wrapper.cpp
M	intern/locale/boost_locale_wrapper.h
A	intern/locale/osx_user_locale.mm
M	intern/opencolorio/CMakeLists.txt
M	intern/opencolorio/ocio_impl.cc
M	intern/opencolorio/ocio_impl_glsl.cc
M	source/blender/blenfont/CMakeLists.txt
M	source/blender/blenkernel/CMakeLists.txt
M	source/blender/blenkernel/intern/DerivedMesh.c
M	source/blender/blenkernel/intern/cdderivedmesh.c
M	source/blender/blenkernel/intern/editderivedmesh.c
M	source/blender/blenkernel/intern/pbvh.c
M	source/blender/blenkernel/intern/smoke.c
M	source/blender/blenkernel/intern/subsurf_ccg.c
M	source/blender/editors/animation/CMakeLists.txt
M	source/blender/editors/armature/CMakeLists.txt
M	source/blender/editors/gpencil/CMakeLists.txt
M	source/blender/editors/include/BIF_gl.h
M	source/blender/editors/interface/CMakeLists.txt
M	source/blender/editors/mask/CMakeLists.txt
M	source/blender/editors/mesh/CMakeLists.txt
M	source/blender/editors/object/CMakeLists.txt
M	source/blender/editors/physics/CMakeLists.txt
M	source/blender/editors/render/CMakeLists.txt
M	source/blender/editors/render/render_opengl.c
M	source/blender/editors/screen/CMakeLists.txt
M	source/blender/editors/sculpt_paint/CMakeLists.txt
M	source/blender/editors/space_action/CMakeLists.txt
M	source/blender/editors/space_buttons/CMakeLists.txt
M	source/blender/editors/space_clip/CMakeLists.txt
M	source/blender/editors/space_console/CMakeLists.txt
M	source/blender/editors/space_file/CMakeLists.txt
M	source/blender/editors/space_graph/CMakeLists.txt
M	source/blender/editors/space_image/CMakeLists.txt
M	source/blender/editors/space_info/CMakeLists.txt
M	source/blender/editors/space_logic/CMakeLists.txt
M	source/blender/editors/space_nla/CMakeLists.txt
M	source/blender/editors/space_node/CMakeLists.txt
M	source/blender/editors/space_outliner/CMakeLists.txt
M	source/blender/editors/space_script/CMakeLists.txt
M	source/blender/editors/space_sequencer/CMakeLists.txt
M	source/blender/editors/space_text/CMakeLists.txt
M	source/blender/editors/space_time/CMakeLists.txt
M	source/blender/editors/space_view3d/CMakeLists.txt
M	source/blender/editors/transform/CMakeLists.txt
M	source/blender/editors/util/CMakeLists.txt
M	source/blender/editors/uvedit/CMakeLists.txt
M	source/blender/gpu/CMakeLists.txt
M	source/blender/gpu/GPU_extensions.h
A	source/blender/gpu/GPU_glew.h
A	source/blender/gpu/GPU_init_exit.h
M	source/blender/gpu/GPU_material.h
M	source/blender/gpu/intern/gpu_buffers.c
M	source/blender/gpu/intern/gpu_codegen.c
M	source/blender/gpu/intern/gpu_codegen.h
M	source/blender/gpu/intern/gpu_draw.c
M	source/blender/gpu/intern/gpu_extensions.c
A	source/blender/gpu/intern/gpu_init_exit.c
M	source/blender/gpu/intern/gpu_simple_shader.c
M	source/blender/makesrna/intern/CMakeLists.txt
M	source/blender/modifiers/CMakeLists.txt
M	source/blender/nodes/CMakeLists.txt
M	source/blender/python/generic/CMakeLists.txt
M	source/blender/python/generic/bgl.c
M	source/blender/python/intern/CMakeLists.txt
M	source/blender/windowmanager/CMakeLists.txt
M	source/blender/windowmanager/intern/wm_draw.c
M	source/blender/windowmanager/intern/wm_init_exit.c
M	source/blender/windowmanager/intern/wm_window.c
M	source/blender/windowmanager/wm_window.h
M	source/blenderplayer/CMakeLists.txt
M	source/creator/CMakeLists.txt
M	source/creator/creator.c
M	source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
M	source/gameengine/BlenderRoutines/CMakeLists.txt
M	source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp
M	source/gameengine/BlenderRoutines/KX_BlenderCanvas.h
M	source/gameengine/GamePlayer/common/CMakeLists.txt
M	source/gameengine/GamePlayer/common/GPC_Canvas.h
M	source/gameengine/GamePlayer/ghost/CMakeLists.txt
M	source/gameengine/GamePlayer/ghost/GPG_Application.cpp
M	source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp
M	source/gameengine/GamePlayer/ghost/GPG_Canvas.h
M	source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
M	source/gameengine/Ketsji/BL_Shader.cpp
M	source/gameengine/Ketsji/BL_Texture.cpp
M	source/gameengine/Ketsji/CMakeLists.txt
M	source/gameengine/Ketsji/KX_BlenderMaterial.cpp
M	source/gameengine/Ketsji/KX_Camera.cpp
M	source/gameengine/Ketsji/KX_Dome.cpp
M	source/gameengine/Ketsji/KX_Dome.h
M	source/gameengine/Ketsji/KX_PythonInit.cpp
M	source/gameengine/Physics/Bullet/CMakeLists.txt
M	source/gameengine/Rasterizer/CMakeLists.txt
M	source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
M	source/gameengine/Rasterizer/RAS_ICanvas.h
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageIM.cpp
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVA.cpp
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVBO.cpp
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVBO.h
M	source/gameengine/VideoTexture/CMakeLists.txt
M	source/gameengine/VideoTexture/ImageBase.cpp
M	source/gameengine/VideoTexture/ImageRender.cpp
M	source/gameengine/VideoTexture/ImageViewport.cpp
M	source/gameengine/VideoTexture/Texture.cpp

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 812b026..cfd2c01 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -164,14 +164,32 @@ mark_as_advanced(WITH_AUDASPACE)
 option(WITH_OPENMP        "Enable OpenMP (has to be supported by the compiler)" ON)
 
 if(UNIX AND NOT APPLE)
-	option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)"	ON)
-	option(WITH_X11_XF86VMODE "Enable X11 video mode switching"	ON)
-	option(WITH_SYSTEM_GLEW "Use GLEW OpenGL wrapper library provided by the operating system" ON)
+	set(WITH_X11 ON)
+else()
+	option(WITH_X11_DEVEL_TEST "Use X11 library (for development purposes only)" OFF)
+	mark_as_advanced(WITH_X11_DEVEL_TEST)
+	set(WITH_X11 ${WITH_X11_DEVEL_TEST})
+endif()
 
-	option(WITH_GHOST_XDND   "Enable drag'n'drop support on X11 using XDND protocol" ON)
+if(WITH_X11)
+	if(UNIX)
+		option(WITH_X11_XINPUT    "Enable X11 Xinput (tablet support and unicode input)" ON)
+		option(WITH_X11_XF86VMODE "Enable X11 video mode switching"                      ON)
+	else()
+		set(WITH_X11_XINPUT    OFF)
+		set(WITH_X11_XF86VMODE OFF)
+	endif()
+
+	option(WITH_GHOST_XDND "Enable drag'n'drop support on X11 using XDND protocol" ON)
+endif()
+
+if(UNIX AND NOT APPLE)
+	option(WITH_SYSTEM_GLEW "Use GLEW OpenGL wrapper library provided by the operating system" ON)
+	option(WITH_SYSTEM_GLES "Use OpenGL ES library provided by the operating system"           ON)
 else()
 	# not an option for other OS's
 	set(WITH_SYSTEM_GLEW OFF)
+	set(WITH_SYSTEM_GLES OFF)
 endif()
 
 
@@ -304,6 +322,42 @@ endif()
 # Unit testsing
 option(WITH_GTESTS "Enable GTest unit testing" OFF)
 
+# OpenGL
+
+option(WITH_GLEW_MX             "Support multiple GLEW contexts (experimental)"                                                                     ON )
+option(WITH_GLEW_ES             "Switches to experimental copy of GLEW that has support for OpenGL ES. (temporary option for development purposes)" OFF)
+option(WITH_GL_EGL              "Use the EGL OpenGL system library instead of the platform specific OpenGL system library (CGL, glX, or WGL)"       OFF)
+option(WITH_GL_PROFILE_COMPAT   "Support using the OpenGL 'compatibility' profile. (deprecated)"                                                    ON )
+option(WITH_GL_PROFILE_CORE     "Support using the OpenGL 3.2+ 'core' profile."                                                                     OFF)
+option(WITH_GL_PROFILE_ES20     "Support using OpenGL ES 2.0. (thru either EGL or the AGL/WGL/XGL 'es20' profile)"                                  OFF)
+
+mark_as_advanced(
+	WITH_GLEW_MX
+	WITH_GLEW_ES
+	WITH_GL_EGL
+	WITH_GL_PROFILE_COMPAT
+	WITH_GL_PROFILE_CORE
+	WITH_GL_PROFILE_ES20
+)
+
+if (WITH_GL_PROFILE_COMPAT)
+	set(WITH_GLU ON)
+else()
+	set(WITH_GLU OFF)
+endif()
+
+if(WIN32)
+	option(WITH_GL_ANGLE "Link with the ANGLE library, an OpenGL ES 2.0 implementation based on Direct3D, instead of the system OpenGL library." OFF)
+	mark_as_advanced(WITH_GL_ANGLE)
+endif()
+
+if(WITH_GLEW_ES AND WITH_SYSTEM_GLEW)
+	message(WARNING Ignoring WITH_SYSTEM_GLEW and using WITH_GLEW_ES)
+	set(WITH_SYSTEM_GLEW OFF)
+endif()
+
+# Apple
+
 if(APPLE)
 	cmake_minimum_required(VERSION 2.8.8)
 	cmake_policy(VERSION 2.8.8)
@@ -496,9 +550,10 @@ if(WITH_INSTALL_PORTABLE)
 endif()
 
 if(WITH_GHOST_SDL OR WITH_HEADLESS)
-	set(WITH_GHOST_XDND OFF)
+	set(WITH_X11           OFF)
+	set(WITH_X11_XINPUT    OFF)
 	set(WITH_X11_XF86VMODE OFF)
-	set(WITH_X11_XINPUT OFF)
+	set(WITH_GHOST_XDND    OFF)
 endif()
 
 TEST_SSE_SUPPORT(COMPILER_SSE_FLAG COMPILER_SSE2_FLAG)
@@ -580,6 +635,35 @@ set(PLATFORM_LINKFLAGS_DEBUG "")
 #-----------------------------------------------------------------------------
 #Platform specifics
 
+if(WITH_X11)
+	find_package(X11 REQUIRED)
+
+	find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})
+	mark_as_advanced(X11_XF86keysym_INCLUDE_PATH)
+
+	list(APPEND PLATFORM_LINKLIBS ${X11_X11_LIB})
+
+	if(WITH_X11_XINPUT)
+		if(X11_Xinput_LIB)
+			list(APPEND PLATFORM_LINKLIBS ${X11_Xinput_LIB})
+		else()
+			set(WITH_X11_XINPUT OFF)
+		endif()
+	endif()
+
+	if(WITH_X11_XF86VMODE)
+		# XXX, why dont cmake make this available?
+		FIND_LIBRARY(X11_Xxf86vmode_LIB Xxf86vm   ${X11_LIB_SEARCH_PATH})
+		mark_as_advanced(X11_Xxf86vmode_LIB)
+		if(X11_Xxf86vmode_LIB)
+			list(APPEND PLATFORM_LINKLIBS ${X11_Xxf86vmode_LIB})
+		else()
+			set(WITH_X11_XF86VMODE OFF)
+		endif()
+	endif()
+
+endif()
+
 if(UNIX AND NOT APPLE)
 	macro(find_package_wrapper)
 		string(TOUPPER ${ARGV0} _NAME_UPPER)
@@ -886,34 +970,7 @@ if(UNIX AND NOT APPLE)
 	endif()
 
 	# OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
-	set(PLATFORM_LINKLIBS "-lutil -lc -lm -lpthread")
-
-	if((NOT WITH_HEADLESS) AND (NOT WITH_GHOST_SDL))
-		find_package(X11 REQUIRED)
-		find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})
-		mark_as_advanced(X11_XF86keysym_INCLUDE_PATH)
-
-		set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} ${X11_X11_LIB}")
-
-		if(WITH_X11_XINPUT)
-			if(X11_Xinput_LIB)
-				set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} ${X11_Xinput_LIB}")
-			else()
-				set(WITH_X11_XINPUT OFF)
-			endif()
-		endif()
-
-		if(WITH_X11_XF86VMODE)
-			# XXX, why dont cmake make this available?
-			FIND_LIBRARY(X11_Xxf86vmode_LIB Xxf86vm   ${X11_LIB_SEARCH_PATH})
-			mark_as_advanced(X11_Xxf86vmode_LIB)
-			if(X11_Xxf86vmode_LIB)
-				set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} ${X11_Xxf86vmode_LIB}")
-			else()
-				set(WITH_X11_XF86VMODE OFF)
-			endif()
-		endif()
-	endif()
+	list(APPEND PLATFORM_LINKLIBS -lutil -lc -lm -lpthread)
 
 	if(CMAKE_SYSTEM_NAME MATCHES "Linux")
 		if(NOT WITH_PYTHON_MODULE)
@@ -970,7 +1027,7 @@ elseif(WIN32)
 
 	if(MSVC)
 
-		set(PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid psapi)
+		list(APPEND PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid psapi)
 
 		add_definitions(
 			-D_CRT_NONSTDC_NO_DEPRECATE
@@ -1348,7 +1405,7 @@ elseif(WIN32)
 			endif()
 		endif()
 		
-		set(PLATFORM_LINKLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi")
+		list(APPEND PLATFORM_LINKLIBS -lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi)
 		set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing")
 
 		if(WITH_MINGW64)
@@ -1711,9 +1768,9 @@ elseif(APPLE)
 	)
 	mark_as_advanced(SYSTEMSTUBS_LIBRARY)
 	if(SYSTEMSTUBS_LIBRARY)
-		set(PLATFORM_LINKLIBS stdc++ SystemStubs)
+		list(APPEND PLATFORM_LINKLIBS stdc++ SystemStubs)
 	else()
-		set(PLATFORM_LINKLIBS stdc++)
+		list(APPEND PLATFORM_LINKLIBS stdc++)
 	endif()
 
 	set(PLATFORM_CFLAGS "-pipe -funsigned-char")
@@ -2025,10 +2082,107 @@ endif()
 
 #-----------------------------------------------------------------------------
 # Configure OpenGL.
-find_package(OpenGL)
-blender_include_dirs_sys("${OPENGL_INCLUDE_DIR}")
-# unset(OPENGL_LIBRARIES CACHE) # not compat with older cmake
-# unset(OPENGL_xmesa_INCLUDE_DIR CACHE) # not compat with older cmake
+
+if(APPLE AND WITH_X11)
+	set(OPENGL_gl_LIBRARY  "/usr/X11R6/lib/libGL.dylib")
+	set(OPENGL_glu_LIBRARY "/usr/X11R6/lib/libGLU.dylib")
+else()
+	find_package(OpenGL)
+endif()
+
+if(WITH_GLU)
+	list(APPEND BLENDER_GL_LIBRARIES "${OPENGL_glu_LIBRARY}")
+	list(APPEND GL_DEFINITIONS -DWITH_GLU)
+endif()
+
+if(NOT WITH_GL_EGL)
+	list(APPEND BLENDER_GL_LIBRARIES "${OPENGL_gl_LIBRARY}")
+
+else()
+	if(WITH_SYSTEM_GLES)
+		find_package_wrapper(OpenGLES)
+
+		if(OPENGLES_FOUND)
+			list(APPEND BLENDER_GL_LIBRARIES OPENGLES_LIBRARIES)
+		else()
+			message(FATAL_ERROR "Unable to find OpenGL ES libraries.  Install them or disable WITH_SYSTEM_GLES.")
+		endif()
+
+	else()
+		set(OPENGLES_LIBRARY     "" CACHE FILEPATH "OpenGL ES 2.0 library file")
+		set(OPENGLES_EGL_LIBRARY "" CACHE FILEPATH "EGL library file")
+
+		mark_as_advanced(
+			OPENGLES_LIBRARY
+			OPENGLES_EGL_LIBRARY
+		)
+
+		list(APPEND BLENDER_GL_LIBRARIES "${OPENGLES_LIBRARY}" "${OPENGLES_EGL_LIBRARY}")
+
+		if (OPENGLES_LIBRARY STREQUAL "")
+			message(FATAL_ERROR "To compile WITH_GL_EGL you need to set OPENGLES_LIBRARY to the file path of an OpenGL ES 2.0 library.")
+		endif()
+
+		if (OPENGLES_EGL_LIBRARY STREQUAL "")
+			message(FATAL_ERROR "To compile WITH_GL_EGL you need to set OPENGLES_EGL_LIBRARY to the file path of an EGL library.")
+		endif()
+
+	endif()
+
+	if(WIN32)
+		# Setup paths to files needed to install and redistribute Windows Blender with OpenGL ES
+
+		set(OPENGLES_DLL     "" CACHE FILEPATH "OpenGL ES 2.0 redistributable DLL file")
+		set(OPENGLES_EGL_DLL "" CACHE FILEPATH "EGL redistributable DLL file")
+
+		mark_as_advanced(
+			OPENGLES_DLL
+			OPENGLES_EGL_DLL
+		)
+
+		if(NOT OPENGLES_DLL)
+			message(FATAL_ERROR "To compile WITH_GL_EGL you need to set OPENGLES_DLL to the file path of an OpenGL ES runtime dynamic link library (DLL).")
+		endif()
+
+		if(NOT OPENGLES_EGL_DLL)
+			message(FATAL_ERROR "To compile WITH_GL_EGL you need to set OPENGLES_EGL_DLL to the file path of an EGL runtime dynamic link library (DLL).")
+		endif()
+
+		if(WITH_GL_ANGLE)
+			list(APPEND GL_DEFINITIONS -DWITH_ANGLE)
+
+			set(D3DCOMPILER_DLL "" CACHE FILEPATH "Direct3D Compiler redistributable DLL file (needed by ANGLE)")
+
+			get_filename_component(D3DCOMPILER_FILENAME "${D3DCOMPILER_DLL}" NAME)
+			list(APPEND GL_DEFINITIONS "-DD3DCOMPILER=\"\\\"${D3DCOMPILER_FILENAME}\\\"\"")
+
+			mark_as_advanced(D3DCOMPILER_DLL)
+
+			if (D3DCOMPILER_DLL STREQUAL "")
+				message(FATAL_ERROR "To compile WITH_GL_ANGLE you need to set D3DCOMPILER_DLL to the file path of a copy of the DirectX redistributable DLL file: D3DCompiler_46.dll")
+			endif()
+
+		endif()
+
+	endif()
+
+endif()
+
+if(WITH_GL_PROFILE_COMPAT)
+	list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_COMPAT)
+endif()
+
+if(WITH_GL_PROFILE_CORE)
+	list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_CORE)
+endif()
+
+if(WITH_GL_PROFILE_ES20)
+	list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_ES20)
+endif()
+
+if(WITH_GL_EGL)
+	list(APPEND GL_DEFINITIONS -DWITH_EGL)
+endif()
 
 #----------------

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list