[Bf-blender-cvs] [a5619fe8263] epoxy: remove glew-mx

Christian Rauch noreply at git.blender.org
Sat Jun 25 14:06:49 CEST 2022


Commit: a5619fe8263e457b32959f9f2d21258c194ff451
Author: Christian Rauch
Date:   Fri Jun 24 22:10:37 2022 +0100
Branches: epoxy
https://developer.blender.org/rBa5619fe8263e457b32959f9f2d21258c194ff451

remove glew-mx

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

M	CMakeLists.txt
M	intern/CMakeLists.txt
M	intern/cycles/blender/CMakeLists.txt
M	intern/cycles/cmake/external_libs.cmake
M	intern/cycles/device/CMakeLists.txt
M	intern/cycles/util/CMakeLists.txt
M	intern/ghost/CMakeLists.txt
M	intern/ghost/test/CMakeLists.txt
D	intern/glew-mx/CMakeLists.txt
D	intern/glew-mx/glew-mx.h
D	intern/glew-mx/intern/gl-deprecated.h
D	intern/glew-mx/intern/glew-mx.c
D	intern/glew-mx/intern/symbol-binding.h
M	intern/opencolorio/CMakeLists.txt
M	source/blender/blenfont/CMakeLists.txt
M	source/blender/blenkernel/CMakeLists.txt
M	source/blender/draw/CMakeLists.txt
M	source/blender/editors/animation/CMakeLists.txt
M	source/blender/editors/armature/CMakeLists.txt
M	source/blender/editors/curve/CMakeLists.txt
M	source/blender/editors/gizmo_library/CMakeLists.txt
M	source/blender/editors/gpencil/CMakeLists.txt
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/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_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_spreadsheet/CMakeLists.txt
M	source/blender/editors/space_statusbar/CMakeLists.txt
M	source/blender/editors/space_text/CMakeLists.txt
M	source/blender/editors/space_topbar/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/makesrna/intern/CMakeLists.txt
M	source/blender/nodes/CMakeLists.txt
M	source/blender/python/generic/CMakeLists.txt
M	source/blender/python/gpu/CMakeLists.txt
M	source/blender/windowmanager/CMakeLists.txt
M	source/creator/CMakeLists.txt

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

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 234fd81be9e..f06f18ef719 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1337,66 +1337,6 @@ if(WITH_OPENMP)
   )
 endif()
 
-#-----------------------------------------------------------------------------
-# Configure GLEW
-
-if(WITH_SYSTEM_GLEW)
-  find_package(GLEW)
-
-  # Note: There is an assumption here that the system GLEW is not a static library.
-
-  if(NOT GLEW_FOUND)
-    message(FATAL_ERROR "GLEW is required to build Blender. Install it or disable WITH_SYSTEM_GLEW.")
-  endif()
-
-  set(GLEW_INCLUDE_PATH "${GLEW_INCLUDE_DIR}")
-  set(BLENDER_GLEW_LIBRARIES ${GLEW_LIBRARY})
-else()
-  if(WITH_GLEW_ES)
-    set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew-es/include")
-
-    list(APPEND GL_DEFINITIONS -DGLEW_STATIC -DWITH_GLEW_ES)
-
-    # These definitions remove APIs from glew.h, making GLEW smaller, and catching unguarded API usage
-    if(WITH_GL_PROFILE_ES20)
-      list(APPEND GL_DEFINITIONS -DGLEW_ES_ONLY)
-    else()
-      # No ES functions are needed
-      list(APPEND GL_DEFINITIONS -DGLEW_NO_ES)
-    endif()
-
-    if(WITH_GL_PROFILE_ES20)
-      if(WITH_GL_EGL)
-        list(APPEND GL_DEFINITIONS -DGLEW_USE_LIB_ES20)
-      endif()
-
-      # ToDo: This is an experiment to eliminate ES 1 symbols,
-      # GLEW doesn't really properly provide this level of control
-      # (for example, without modification it eliminates too many symbols)
-      # so there are lots of modifications to GLEW to make this work,
-      # and no attempt to make it work beyond Blender at this point.
-      list(APPEND GL_DEFINITIONS -DGL_ES_VERSION_1_0=0 -DGL_ES_VERSION_CL_1_1=0 -DGL_ES_VERSION_CM_1_1=0)
-    endif()
-
-    set(BLENDER_GLEW_LIBRARIES extern_glew_es bf_intern_glew_mx)
-
-  else()
-    set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew/include")
-
-    list(APPEND GL_DEFINITIONS -DGLEW_STATIC)
-
-    # This won't affect the non-experimental glew library,
-    # but is used for conditional compilation elsewhere.
-    list(APPEND GL_DEFINITIONS -DGLEW_NO_ES)
-
-    set(BLENDER_GLEW_LIBRARIES extern_glew)
-
-  endif()
-
-endif()
-
-list(APPEND GL_DEFINITIONS -DGLEW_NO_GLU)
-
 #-----------------------------------------------------------------------------
 # Configure Bullet
 
@@ -1922,7 +1862,6 @@ if(WITH_BLENDER)
   # internal and external library information first, for test linking
   add_subdirectory(source)
 elseif(WITH_CYCLES_STANDALONE OR WITH_CYCLES_HYDRA_RENDER_DELEGATE)
-  add_subdirectory(intern/glew-mx)
   add_subdirectory(intern/guardedalloc)
   add_subdirectory(intern/libc_compat)
   add_subdirectory(intern/sky)
diff --git a/intern/CMakeLists.txt b/intern/CMakeLists.txt
index 2ff2fb39806..eb69a60c1ed 100644
--- a/intern/CMakeLists.txt
+++ b/intern/CMakeLists.txt
@@ -11,7 +11,6 @@ add_subdirectory(memutil)
 add_subdirectory(opencolorio)
 add_subdirectory(opensubdiv)
 add_subdirectory(mikktspace)
-add_subdirectory(glew-mx)
 add_subdirectory(eigen)
 add_subdirectory(sky)
 
diff --git a/intern/cycles/blender/CMakeLists.txt b/intern/cycles/blender/CMakeLists.txt
index 4919b99cfe0..b63a4a086f7 100644
--- a/intern/cycles/blender/CMakeLists.txt
+++ b/intern/cycles/blender/CMakeLists.txt
@@ -3,7 +3,6 @@
 
 set(INC
   ..
-  ../../glew-mx
   ../../guardedalloc
   ../../mikktspace
   ../../../source/blender/makesdna
diff --git a/intern/cycles/cmake/external_libs.cmake b/intern/cycles/cmake/external_libs.cmake
index d2f30fe764b..3411dd5d4a7 100644
--- a/intern/cycles/cmake/external_libs.cmake
+++ b/intern/cycles/cmake/external_libs.cmake
@@ -502,29 +502,6 @@ if(CYCLES_STANDALONE_REPOSITORY)
   endif()
 endif()
 
-###########################################################################
-# GLEW
-###########################################################################
-
-if(CYCLES_STANDALONE_REPOSITORY)
-  if((WITH_CYCLES_STANDALONE AND WITH_CYCLES_STANDALONE_GUI) OR
-     WITH_CYCLES_HYDRA_RENDER_DELEGATE)
-    if(MSVC AND EXISTS ${_cycles_lib_dir})
-      set(GLEW_LIBRARY "${_cycles_lib_dir}/opengl/lib/glew.lib")
-      set(GLEW_INCLUDE_DIR "${_cycles_lib_dir}/opengl/include")
-      add_definitions(-DGLEW_STATIC)
-    else()
-      find_package(GLEW REQUIRED)
-    endif()
-
-    set(CYCLES_GLEW_LIBRARIES ${GLEW_LIBRARY})
-  endif()
-else()
-  # Workaround for unconventional variable name use in Blender.
-  set(GLEW_INCLUDE_DIR "${GLEW_INCLUDE_PATH}")
-  set(CYCLES_GLEW_LIBRARIES bf_intern_glew_mx ${BLENDER_GLEW_LIBRARIES})
-endif()
-
 ###########################################################################
 # Alembic
 ###########################################################################
diff --git a/intern/cycles/device/CMakeLists.txt b/intern/cycles/device/CMakeLists.txt
index 6205775260a..3c743fb979f 100644
--- a/intern/cycles/device/CMakeLists.txt
+++ b/intern/cycles/device/CMakeLists.txt
@@ -3,7 +3,6 @@
 
 set(INC
   ..
-  ../../glew-mx
 )
 
 set(INC_SYS
diff --git a/intern/cycles/util/CMakeLists.txt b/intern/cycles/util/CMakeLists.txt
index fddac1dbbcf..17161f2c37b 100644
--- a/intern/cycles/util/CMakeLists.txt
+++ b/intern/cycles/util/CMakeLists.txt
@@ -3,7 +3,6 @@
 
 set(INC
   ..
-  ../../glew-mx
 )
 
 set(INC_SYS
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index 150bcb9273e..17a16181537 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -3,7 +3,6 @@
 
 set(INC
   .
-  ../glew-mx
   ../../source/blender/imbuf
   ../../source/blender/makesdna
 )
@@ -67,10 +66,7 @@ set(SRC
   intern/GHOST_WindowManager.h
 )
 
-set(LIB
-  bf_intern_glew_mx
-  ${GLEW_LIBRARY}
-)
+set(LIB )
 
 if(WITH_GHOST_DEBUG)
   list(APPEND SRC
diff --git a/intern/ghost/test/CMakeLists.txt b/intern/ghost/test/CMakeLists.txt
index 9cc406313c7..cbb48dabb52 100644
--- a/intern/ghost/test/CMakeLists.txt
+++ b/intern/ghost/test/CMakeLists.txt
@@ -155,13 +155,6 @@ suffix_relpaths(SRC_NEW "${SRC}" "../../../extern/wcwidth/")
 include_directories(${INC_NEW})
 add_library(wcwidth_lib ${SRC_NEW})
 
-# glew-mx
-include(${CMAKE_SOURCE_DIR}/../../../intern/glew-mx/CMakeLists.txt)
-suffix_relpaths(INC_NEW "${INC}" "../../../intern/glew-mx/")
-suffix_relpaths(SRC_NEW "${SRC}" "../../../intern/glew-mx/")
-include_directories(${INC_NEW})
-add_library(glewmx_lib ${SRC_NEW})
-
 # grr, blenfont needs BLI
 include_directories(
   "../../../source/blender/blenlib"
diff --git a/intern/glew-mx/CMakeLists.txt b/intern/glew-mx/CMakeLists.txt
deleted file mode 100644
index 49e9762672f..00000000000
--- a/intern/glew-mx/CMakeLists.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-or-later
-# Copyright 2014 Blender Foundation. All rights reserved.
-
-set(INC
-  .
-)
-
-set(INC_SYS
-  ${GLEW_INCLUDE_PATH}
-)
-
-set(SRC
-  intern/glew-mx.c
-
-  glew-mx.h
-  intern/gl-deprecated.h
-  intern/symbol-binding.h
-)
-
-set(LIB
-)
-
-add_definitions(${GL_DEFINITIONS})
-
-blender_add_lib(bf_intern_glew_mx "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/glew-mx/glew-mx.h b/intern/glew-mx/glew-mx.h
deleted file mode 100644
index e7972697010..00000000000
--- a/intern/glew-mx/glew-mx.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later
- * Copyright 2014 Blender Foundation. All rights reserved. */
-
-/** \file
- * \ingroup intern_glew-mx
- *
- * Support for GLEW Multiple rendering conteXts (MX)
- * Maintained as a Blender Library.
- *
- * Different rendering contexts may have different entry points
- * to extension functions of the same name.  So it can cause
- * problems if, for example, a second context uses a pointer to
- * say, glActiveTextureARB, that was queried from the first context.
- *
- * GLEW has basic support for multiple contexts by enabling WITH_GLEW_MX,
- * but it does not provide a full implementation.  This is because
- * there are too many questions about thread safety and memory
- * allocation that are up to the user of GLEW.
- *
- * This implementation is very basic and isn't thread safe.
- * For a single context the overhead should be
- * no more than using GLEW without WITH_GLEW_MX enabled.
- */
-
-#ifndef __GLEW_MX_H__
-#define __GLEW_MX_H__
-
-#include <GL/glew.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "intern/symbol-binding.h"
-
-/* If compiling only for OpenGL 3.2 Core Profile then we should make sure
- * no legacy API entries or symbolic constants are used.
- */
-#if (!defined(WITH_LEGACY_OPENGL)) || defined(WITH_GL_PROFILE_CORE) && \
-                                          !defined(WITH_GL_PROFILE_COMPAT) && \
-                                          !defined(WITH_GL_PROFILE_ES20)
-#  include "intern/gl-deprecated.h"
-#endif
-
-GLenum glew_chk(GLenum error, const char *file, int line, const char *text);
-
-#ifndef NDEBUG
-#  define GLEW_CHK(x) glew_chk((x), __FILE__, __LINE__, #  x)
-#else
-#  define GLEW_CHK(x) glew_chk((x), NULL, 0, NULL)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __GLEW_MX_H__ */
diff --git a/intern/glew-mx/intern/gl-deprecated.h b/intern/glew-mx/intern/gl-deprecated.h
deleted file mode 100644
index 762699d74d2..00000000000
--- a/intern/glew-mx/intern/gl-deprecated.h
+++ /dev/null
@@ -1,848 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later
- * Copyright 2014 Blender Foundation. All rights reserved. */
-
-/** \file
- * \ingroup intern_glew-mx
- *  Utility used to check for use of deprecated functions.
- */
-
-#ifndef __GL_DEPRECATED_H__
-#define __GL_DEPRECATED_H__
-
-// GL Version 1.0
-#undef glAccum
-#define glAccum DO_NOT_USE_glAccum
-#undef glAlphaFunc
-#define glAlphaFunc DO_NOT_USE_glAlphaFunc
-#undef glBegin
-#define glBegin DO_NOT_USE_glBegin
-#undef glBitmap
-#define glBitmap DO_NOT_USE_glBitmap
-#undef glCallList
-#define glCallList DO_NOT_USE_glCallList
-#undef glCallLists
-#define glCallLists DO_NOT_USE_glCallLists
-#undef glClearAccum
-#define glClearAccum DO_NOT_USE_glClearAccum
-#undef glClearIndex
-#define glClearIndex DO_NOT_USE_glClearIndex
-#undef glClipPlane
-#define glClipPlane DO_NOT_USE_glClipPlane
-#undef glColor3b
-#define glColor3b DO_NOT_USE_glColor3b
-#undef glColor3bv
-#define glColor3bv DO_NOT_USE_glColor3bv
-#undef glColor3d
-#define glColor3d DO_NOT_USE_glColor3d
-#undef glColor3dv
-#define glColor3d

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list