void-packages/srcpkgs/ufoai/patches/sdl2_gl_orthof.patch
Đoàn Trần Công Danh 5769f150de srcpkgs/u*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

17 lines
557 B
Diff

SDL_opengl.h dosen't have the nessecary headers. GL/gl.h has the parts
of SDL_opengl.h needed for SDL_opengl_glext.h, then include
SDL_opengl_glext.h which has the *f functions.
--- a/src/client/renderer/r_gl.h 2020-10-08 07:50:29.818581990 +1100
+++ b/src/client/renderer/r_gl.h 2020-10-08 07:52:16.805006133 +1100
@@ -29,7 +29,8 @@
#include "../../ports/android/r_gles_android.h"
#include <stdlib.h>
#else
-#include <SDL_opengl.h>
+#include <GL/gl.h>
+#include <SDL_opengl_glext.h>
#endif
inline void R_DrawArrays (GLint first, GLsizei count) {