Cleanup: Remove BIF_gl.h
authorJeroen Bakker <j.bakker@atmind.nl>
Fri, 20 Sep 2019 10:44:29 +0000 (12:44 +0200)
committerJeroen Bakker <j.bakker@atmind.nl>
Wed, 27 Nov 2019 15:10:07 +0000 (16:10 +0100)
BIF_gl.h included hacks like redefining glew functions and a constant.
The named constant `GLA_PIXEL_OFS` has been moved to `GPU_viewport.h`

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5860

15 files changed:
source/blender/draw/engines/workbench/workbench_forward.c
source/blender/draw/engines/workbench/workbench_materials.c
source/blender/draw/modes/paint_texture_mode.c
source/blender/editors/include/BIF_gl.h [deleted file]
source/blender/editors/interface/interface_eyedropper_color.c
source/blender/editors/mesh/editface.c
source/blender/editors/render/render_preview.c
source/blender/editors/util/CMakeLists.txt
source/blender/gpu/GPU_viewport.h
source/blender/gpu/intern/gpu_viewport.c
source/blender/makesrna/intern/rna_image_api.c
source/blender/windowmanager/intern/wm_dragdrop.c
source/blender/windowmanager/intern/wm_draw.c
source/blender/windowmanager/intern/wm_stereo.c
source/blender/windowmanager/intern/wm_subwindow.c

index 7a027bf9c86d75e4d802aed2732a5daae5fc42bd..80b274e9b76b89ed086001051b441b5bd0e6d4da 100644 (file)
@@ -22,8 +22,6 @@
 
 #include "workbench_private.h"
 
-#include "BIF_gl.h"
-
 #include "BLI_alloca.h"
 #include "BLI_dynstr.h"
 #include "BLI_string_utils.h"
index 0f9551a8cc9e13541a840363cd6c14b4a49fdad4..45d49448490c106d6635e1f8cd4a82f8cad9219e 100644 (file)
@@ -22,8 +22,6 @@
 
 #include "workbench_private.h"
 
-#include "BIF_gl.h"
-
 #include "BKE_image.h"
 #include "BKE_node.h"
 
index 7c164a74f2fc716f28c00ae5a22f82c249f17afd..969dc54ab7df310a06fd15787cb194de3ea536e4 100644 (file)
@@ -23,8 +23,6 @@
 #include "DRW_engine.h"
 #include "DRW_render.h"
 
-#include "BIF_gl.h"
-
 #include "BKE_node.h"
 
 #include "BLI_string_utils.h"
diff --git a/source/blender/editors/include/BIF_gl.h b/source/blender/editors/include/BIF_gl.h
deleted file mode 100644 (file)
index 84820c3..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- * os dependent include locations of gl.h
- */
-
-/** \file
- * \ingroup editorui
- */
-
-#ifndef __BIF_GL_H__
-#define __BIF_GL_H__
-
-#include "GPU_glew.h"
-#include "BLI_utildefines.h"
-
-/* hacking pointsize and linewidth */
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
-#  define glPointSize(f) \
-    glPointSize(U.pixelsize *_Generic((f), double : (float)(f), default : (f)))
-#  define glLineWidth(f) \
-    glLineWidth(U.pixelsize *_Generic((f), double : (float)(f), default : (f)))
-#else
-#  define glPointSize(f) glPointSize(U.pixelsize *(f))
-#  define glLineWidth(f) glLineWidth(U.pixelsize *(f))
-#endif /* C11 */
-
-#define GLA_PIXEL_OFS 0.375f
-
-#endif /* #ifdef __BIF_GL_H__ */
index 0cf357c508b67f6580ada591f66d2530b5ef32d3..2b5cf2ed6b952643209bd8310b5a6faab2f9aa5a 100644 (file)
@@ -39,7 +39,7 @@
 
 #include "RNA_access.h"
 
-#include "BIF_gl.h"
+#include "GPU_glew.h"
 
 #include "UI_interface.h"
 
index b7f506a8a41495b2baa6ab1604836b5e8fe6bc86..5c9fb866df7bc25ca679239d128d6058299d0c9e 100644 (file)
@@ -36,8 +36,6 @@
 #include "BKE_global.h"
 #include "BKE_mesh.h"
 
-#include "BIF_gl.h"
-
 #include "ED_mesh.h"
 #include "ED_screen.h"
 #include "ED_select_utils.h"
index 6dc3a1ec1ac8098d1e969fa2c1899ed4e36e22a6..1fe299e58a949e96c9170680ad03239b6d42e6bd 100644 (file)
 #include "IMB_imbuf_types.h"
 #include "IMB_thumbs.h"
 
-#include "BIF_gl.h"
 #include "BIF_glutil.h"
 
 #include "GPU_shader.h"
+#include "GPU_glew.h"
 
 #include "RE_pipeline.h"
 #include "RE_engine.h"
index 0c52dd1509284df9766459ee801a8413ca8b0398..987327eefc1d19da258fa3b1a7fba3d2a417048e 100644 (file)
@@ -44,7 +44,6 @@ set(SRC
   select_utils.c
 
   # general includes
-  ../include/BIF_gl.h
   ../include/BIF_glutil.h
   ../include/ED_anim_api.h
   ../include/ED_armature.h
index 4bbcb6a433521be0ff761344d2e728d6853d571d..e692262358b50523396527a6515921c7d773287f 100644 (file)
@@ -32,6 +32,7 @@
 #include "GPU_texture.h"
 
 #define GPU_INFO_SIZE 512 /* IMA_MAX_RENDER_TEXT */
+#define GLA_PIXEL_OFS 0.375f
 
 typedef struct GPUViewport GPUViewport;
 
index 615af57c1bdf529a0c555eaf904f695ff2a16b15..519cd918b5322f28f2cc15aef7541e7471a94f62 100644 (file)
@@ -29,8 +29,6 @@
 #include "BLI_rect.h"
 #include "BLI_memblock.h"
 
-#include "BIF_gl.h"
-
 #include "DNA_vec_types.h"
 #include "DNA_userdef_types.h"
 
index d167c650683a7a3007a033b5ae97864121f06e9a..997a5f5ca453af7eab04b9b092b71f82acce83c3 100644 (file)
@@ -31,8 +31,6 @@
 #include "BLI_utildefines.h"
 #include "BLI_path_util.h"
 
-#include "BIF_gl.h"
-
 #include "RNA_define.h"
 #include "RNA_enum_types.h"
 
@@ -52,6 +50,8 @@
 #  include "DNA_image_types.h"
 #  include "DNA_scene_types.h"
 
+#  include "GPU_glew.h"
+
 #  include "MEM_guardedalloc.h"
 
 static void rna_ImagePackedFile_save(ImagePackedFile *imapf, Main *bmain, ReportList *reports)
index 901594850dd3c88fe5b48062c958b696abd0c05a..e2462bb59b19b631ef2cd3704e34fcb3c8d3efbb 100644 (file)
 
 #include "BLI_blenlib.h"
 
-#include "BIF_gl.h"
 #include "BIF_glutil.h"
 
 #include "BKE_context.h"
 #include "BKE_idcode.h"
 
+#include "GPU_glew.h"
 #include "GPU_shader.h"
 #include "GPU_state.h"
+#include "GPU_viewport.h"
 
 #include "IMB_imbuf_types.h"
 
index 2f538a19ba2df5567596e80712a759c623899f1c..09b7d89fc2b489344d7df1bfbaf5c9ab95b44263 100644 (file)
@@ -39,8 +39,6 @@
 #include "BLI_blenlib.h"
 #include "BLI_utildefines.h"
 
-#include "BIF_gl.h"
-
 #include "BKE_context.h"
 #include "BKE_image.h"
 #include "BKE_main.h"
index 9b62e53213241264475a75d503961e48ae142b93..54953c097eb3cbdda1817f6ebc34d074ef27a82b 100644 (file)
@@ -32,8 +32,6 @@
 
 #include "BLI_utildefines.h"
 
-#include "BIF_gl.h"
-
 #include "BKE_context.h"
 #include "BKE_global.h"
 #include "BKE_report.h"
@@ -44,6 +42,7 @@
 
 #include "GPU_immediate.h"
 #include "GPU_texture.h"
+#include "GPU_viewport.h"
 
 #include "WM_api.h"
 #include "WM_types.h"
index 2f40947b395c67a76f670eafaf5bb008d7bc1b57..6a5de84ac31343fb1f26ca276a541408bd57c739 100644 (file)
@@ -29,9 +29,9 @@
 #include "DNA_screen_types.h"
 #include "DNA_windowmanager_types.h"
 
-#include "BIF_gl.h"
-
+#include "GPU_glew.h"
 #include "GPU_matrix.h"
+#include "GPU_viewport.h"
 
 #include "WM_api.h"