mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Adds a patch to automatically apply the macOS fix to glad after its generation.
This commit is contained in:
committed by
Vladislav Belov
parent
1a216cb848
commit
ff923e5d6a
Vendored
+2
@@ -17,6 +17,8 @@ pip install -r requirements.txt
|
||||
|
||||
Do not revert the WFG patch in include/glad/gl.h (around line 1765):
|
||||
do not add the change reverting it after the generation of the file
|
||||
Currently it's automatically applied by running the update-headers script.
|
||||
On Windows you need to run it under Git Bash or with the `patch` program in PATH.
|
||||
|
||||
Build the source files for all four backends with their respective extensions
|
||||
- GL
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
diff --git b/include/glad/gl.h a/include/glad/gl.h
|
||||
index 0a8db581a6..4c7c3564c3 100644
|
||||
--- b/include/glad/gl.h
|
||||
+++ a/include/glad/gl.h
|
||||
@@ -1763,7 +1763,11 @@ typedef void *GLeglImageOES;
|
||||
typedef char GLchar;
|
||||
typedef char GLcharARB;
|
||||
#ifdef __APPLE__
|
||||
-typedef void *GLhandleARB;
|
||||
+// --- Patched by WFG
|
||||
+// See https://bugs.freedesktop.org/show_bug.cgi?id=66346
|
||||
+// macOS considers those to be different.
|
||||
+// typedef void *GLhandleARB;
|
||||
+typedef GLuint GLhandleARB;
|
||||
#else
|
||||
typedef unsigned int GLhandleARB;
|
||||
#endif
|
||||
+1
@@ -6,6 +6,7 @@ python -m glad --api="glx=1.4" --extensions="../extensions/glx.txt" --out-path="
|
||||
python -m glad --api="wgl=1.0" --extensions="../extensions/wgl.txt" --out-path="../" c
|
||||
python -m glad --api="vulkan=1.1" --extensions="../extensions/vulkan.txt" --out-path="../" c
|
||||
cd ..
|
||||
patch -p1 --ignore-whitespace --fuzz 1 < fix_macos.patch
|
||||
MOVE src\gl.c src\gl.cpp
|
||||
MOVE src\gles2.c src\gles2.cpp
|
||||
MOVE src\glx.c src\glx.cpp
|
||||
|
||||
+1
@@ -8,6 +8,7 @@
|
||||
python -m glad --api="egl=1.5" --extensions="../extensions/egl.txt" --out-path="../" c
|
||||
python -m glad --api="vulkan=1.1" --extensions="../extensions/vulkan.txt" --out-path="../" c
|
||||
)
|
||||
patch -p1 --ignore-whitespace --fuzz 1 <fix_macos.patch
|
||||
mv src/gl.c src/gl.cpp
|
||||
mv src/gles2.c src/gles2.cpp
|
||||
mv src/glx.c src/glx.cpp
|
||||
|
||||
Reference in New Issue
Block a user