[Bf-blender-cvs] [3f572bbdb07] epoxy: remove GPU_glew.h

Christian Rauch noreply at git.blender.org
Mon Jul 4 11:41:52 CEST 2022


Commit: 3f572bbdb07ce4743a8dcfb8d31680bd06e4ccf0
Author: Christian Rauch
Date:   Fri Jun 24 22:25:02 2022 +0100
Branches: epoxy
https://developer.blender.org/rB3f572bbdb07ce4743a8dcfb8d31680bd06e4ccf0

remove GPU_glew.h

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

M	source/blender/gpu/CMakeLists.txt
D	source/blender/gpu/GPU_glew.h
D	source/blender/gpu/GPU_legacy_stubs.h
M	source/blender/gpu/tests/gpu_shader_test.cc

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

diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index 0cd55209933..71355236ba0 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -90,12 +90,10 @@ set(SRC
   GPU_debug.h
   GPU_drawlist.h
   GPU_framebuffer.h
-  GPU_glew.h
   GPU_immediate.h
   GPU_immediate_util.h
   GPU_index_buffer.h
   GPU_init_exit.h
-  GPU_legacy_stubs.h
   GPU_material.h
   GPU_matrix.h
   GPU_platform.h
diff --git a/source/blender/gpu/GPU_glew.h b/source/blender/gpu/GPU_glew.h
deleted file mode 100644
index 38209a0eb17..00000000000
--- a/source/blender/gpu/GPU_glew.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later
- * Copyright 2012 Blender Foundation. All rights reserved. */
-
-/** \file
- * \ingroup gpu
- */
-
-#pragma once
-
-#if defined(WITH_OPENGL)
-#  include "glew-mx.h"
-#  ifndef WITH_LEGACY_OPENGL
-#    include "GPU_legacy_stubs.h"
-#  endif
-#endif
diff --git a/source/blender/gpu/GPU_legacy_stubs.h b/source/blender/gpu/GPU_legacy_stubs.h
deleted file mode 100644
index 5970738a9b3..00000000000
--- a/source/blender/gpu/GPU_legacy_stubs.h
+++ /dev/null
@@ -1,497 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later
- * Copyright 2017 Blender Foundation. All rights reserved. */
-
-/** \file
- * \ingroup gpu
- *
- * This is to mark the transition to OpenGL core profile
- * The idea is to allow Blender 2.8 to be built with OpenGL 3.3 even if it means breaking things
- *
- * This file should be removed in the future
- */
-
-#pragma once
-
-#if defined(__GNUC__)
-#  pragma GCC diagnostic push
-#  pragma GCC diagnostic ignored "-Wunused-parameter"
-#  pragma GCC diagnostic ignored "-Wunused-function"
-#endif
-
-#include <stdlib.h> /* for abort(). */
-
-#include "BLI_utildefines.h"
-
-/**
- * Empty function, use for break-point when a deprecated
- * OpenGL function is called.
- */
-static void gl_deprecated(void)
-{
-  BLI_assert(true);
-}
-
-#define _GL_BOOL BLI_INLINE GLboolean
-#define _GL_BOOL_RET \
-  { \
-    gl_deprecated(); \
-    return false; \
-  }
-
-#define _GL_ENUM BLI_INLINE GLenum
-#define _GL_ENUM_RET \
-  { \
-    gl_deprecated(); \
-    return 0; \
-  }
-
-#define _GL_INT BLI_INLINE GLint
-#define _GL_INT_RET \
-  { \
-    gl_deprecated(); \
-    return 0; \
-  }
-
-#define _GL_UINT BLI_INLINE GLuint
-#define _GL_UINT_RET \
-  { \
-    gl_deprecated(); \
-    return 0; \
-  }
-
-#define _GL_VOID BLI_INLINE void
-#define _GL_VOID_RET \
-  { \
-    gl_deprecated(); \
-  }
-
-static bool disable_enable_check(GLenum cap)
-{
-  const bool is_deprecated = ELEM(cap,
-                                  GL_ALPHA_TEST,
-                                  GL_LINE_STIPPLE,
-                                  GL_POINT_SPRITE,
-                                  GL_TEXTURE_1D,
-                                  GL_TEXTURE_2D,
-                                  GL_TEXTURE_GEN_S,
-                                  GL_TEXTURE_GEN_T,
-                                  -1);
-
-  if (is_deprecated) {
-    gl_deprecated();
-  }
-
-  return is_deprecated;
-}
-
-_GL_VOID USE_CAREFULLY_glDisable(GLenum cap)
-{
-  if (!disable_enable_check(cap)) {
-    glDisable(cap);
-  }
-}
-#define glDisable USE_CAREFULLY_glDisable
-
-_GL_VOID USE_CAREFULLY_glEnable(GLenum cap)
-{
-  if (!disable_enable_check(cap)) {
-    glEnable(cap);
-  }
-}
-#define glEnable USE_CAREFULLY_glEnable
-
-/**
- * Hand written cases
- */
-
-_GL_VOID DO_NOT_USE_glClientActiveTexture(GLenum texture) _GL_VOID_RET
-
-/**
- * List automatically generated from `gl-deprecated.h` and `glew.h`
- */
-
-/**
- * ENUM values
- */
-#define DO_NOT_USE_GL_CURRENT_FOG_COORDINATE 0
-#define DO_NOT_USE_GL_FOG_COORDINATE 0
-#define DO_NOT_USE_GL_FOG_COORDINATE_ARRAY 0
-#define DO_NOT_USE_GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0
-#define DO_NOT_USE_GL_FOG_COORDINATE_ARRAY_POINTER 0
-#define DO_NOT_USE_GL_FOG_COORDINATE_ARRAY_STRIDE 0
-#define DO_NOT_USE_GL_FOG_COORDINATE_ARRAY_TYPE 0
-#define DO_NOT_USE_GL_FOG_COORDINATE_SOURCE 0
-#define DO_NOT_USE_GL_POINT_SIZE_GRANULARITY 0
-#define DO_NOT_USE_GL_POINT_SIZE_RANGE 0
-#define DO_NOT_USE_GL_SOURCE0_ALPHA 0
-#define DO_NOT_USE_GL_SOURCE0_RGB 0
-#define DO_NOT_USE_GL_SOURCE1_ALPHA 0
-#define DO_NOT_USE_GL_SOURCE1_RGB 0
-#define DO_NOT_USE_GL_SOURCE2_ALPHA 0
-#define DO_NOT_USE_GL_SOURCE2_RGB 0
-
-    /**
-     * Functions
-     */
-    _GL_VOID DO_NOT_USE_glAccum(GLenum op, GLfloat value) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glAlphaFunc(GLenum func, GLclampf ref) _GL_VOID_RET _GL_BOOL
-    DO_NOT_USE_glAreTexturesResident(GLsizei n,
-                                     const GLuint *textures,
-                                     GLboolean *residences) _GL_BOOL_RET _GL_VOID
-    DO_NOT_USE_glArrayElement(GLint i) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glBegin(GLenum mode) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glBitmap(GLsizei width,
-                        GLsizei height,
-                        GLfloat xorig,
-                        GLfloat yorig,
-                        GLfloat xmove,
-                        GLfloat ymove,
-                        const GLubyte *bitmap) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glCallList(GLuint list) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glCallLists(GLsizei n, GLenum type, const void *lists) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
-        _GL_VOID_RET _GL_VOID DO_NOT_USE_glClearIndex(GLfloat c) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glClipPlane(GLenum plane, const GLdouble *equation) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor3b(GLbyte red, GLbyte green, GLbyte blue) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor3bv(const GLbyte *v) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor3d(GLdouble red, GLdouble green, GLdouble blue) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor3dv(const GLdouble *v) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor3f(GLfloat red, GLfloat green, GLfloat blue) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor3fv(const GLfloat *v) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor3i(GLint red, GLint green, GLint blue) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor3iv(const GLint *v) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor3s(GLshort red, GLshort green, GLshort blue) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor3sv(const GLshort *v) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor3ub(GLubyte red, GLubyte green, GLubyte blue) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor3ubv(const GLubyte *v) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor3ui(GLuint red, GLuint green, GLuint blue) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor3uiv(const GLuint *v) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor3us(GLushort red, GLushort green, GLushort blue) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor3usv(const GLushort *v) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor4bv(const GLbyte *v) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
-        _GL_VOID_RET _GL_VOID DO_NOT_USE_glColor4dv(const GLdouble *v) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
-        _GL_VOID_RET _GL_VOID DO_NOT_USE_glColor4fv(const GLfloat *v) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor4i(GLint red, GLint green, GLint blue, GLint alpha) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor4iv(const GLint *v) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
-        _GL_VOID_RET _GL_VOID DO_NOT_USE_glColor4sv(const GLshort *v) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
-        _GL_VOID_RET _GL_VOID DO_NOT_USE_glColor4ubv(const GLubyte *v) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
-        _GL_VOID_RET _GL_VOID DO_NOT_USE_glColor4uiv(const GLuint *v) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha)
-        _GL_VOID_RET _GL_VOID DO_NOT_USE_glColor4usv(const GLushort *v) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColorMaterial(GLenum face, GLenum mode) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
-        _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
-        _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glDeleteLists(GLuint list, GLsizei range) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glDisableClientState(GLenum array) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glDrawPixels(GLsizei width,
-                            GLsizei height,
-                            GLenum format,
-                            GLenum type,
-                            const void *pixels) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glEdgeFlag(GLboolean flag) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glEdgeFlagPointer(GLsizei stride, const void *pointer) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glEdgeFlagv(const GLboolean *flag) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glEnableClientState(GLenum array) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glEnd(void) _GL_VOID_RET _GL_VOID DO_NOT_USE_glEndList(void) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glEvalCoord1d(GLdouble u) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glEvalCoord1dv(const GLdouble *u) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glEvalCoord1f(GLfloat u) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glEvalCoord1fv(const GLfloat *u) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glEvalCoord2d(GLdouble u, GLdouble v) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glEvalCoord2dv(const GLdouble *u) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glEvalCoord2f(GLfloat u, GLfloat v) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glEvalCoord2fv(const GLfloat *u) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glEvalMesh1(GLenum mode, GLint i1, GLint i2) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
-        _GL_VOID_RET _GL_VOID DO_NOT_USE_glEvalPoint1(GLint i) _GL_VOID_RET _GL_VOID
-    DO_NOT_USE_glEvalPoint2(GLint i, GLint j) _GL_VOID_RET _GL_VOID
-    

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list