From 0b0054f8e2453cdff1020542fbe3fffe0f1c20f5 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 2 Nov 2021 11:32:09 +0100 Subject: freeglut: update to 3.2.1, add buildroot patch to compile with gcc 10.x --- package/freeglut/patches/patch-src_fg_gl2_c | 23 +++++++++++++++++++++++ package/freeglut/patches/patch-src_fg_gl2_h | 23 +++++++++++++++++++++++ package/freeglut/patches/patch-src_fg_version_h | 16 ++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 package/freeglut/patches/patch-src_fg_gl2_c create mode 100644 package/freeglut/patches/patch-src_fg_gl2_h create mode 100644 package/freeglut/patches/patch-src_fg_version_h (limited to 'package/freeglut/patches') diff --git a/package/freeglut/patches/patch-src_fg_gl2_c b/package/freeglut/patches/patch-src_fg_gl2_c new file mode 100644 index 000000000..dbd947a91 --- /dev/null +++ b/package/freeglut/patches/patch-src_fg_gl2_c @@ -0,0 +1,23 @@ +--- freeglut-3.2.1.orig/src/fg_gl2.c 2014-06-01 11:24:47.000000000 +0200 ++++ freeglut-3.2.1/src/fg_gl2.c 2021-11-02 10:29:44.673793670 +0100 +@@ -27,6 +27,20 @@ + #include "fg_internal.h" + #include "fg_gl2.h" + ++#ifndef GL_ES_VERSION_2_0 ++/* GLES2 has the corresponding entry points built-in, and these fgh-prefixed ++ * names are defined in fg_gl2.h header to reference them, for any other case, ++ * define them as function pointers here. ++ */ ++FGH_PFNGLGENBUFFERSPROC fghGenBuffers; ++FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers; ++FGH_PFNGLBINDBUFFERPROC fghBindBuffer; ++FGH_PFNGLBUFFERDATAPROC fghBufferData; ++FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray; ++FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray; ++FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer; ++#endif ++ + void FGAPIENTRY glutSetVertexAttribCoord3(GLint attrib) { + if (fgStructure.CurrentWindow != NULL) + fgStructure.CurrentWindow->Window.attribute_v_coord = attrib; diff --git a/package/freeglut/patches/patch-src_fg_gl2_h b/package/freeglut/patches/patch-src_fg_gl2_h new file mode 100644 index 000000000..a552d4fa9 --- /dev/null +++ b/package/freeglut/patches/patch-src_fg_gl2_h @@ -0,0 +1,23 @@ +--- freeglut-3.2.1.orig/src/fg_gl2.h 2012-04-21 20:22:24.000000000 +0200 ++++ freeglut-3.2.1/src/fg_gl2.h 2021-11-02 10:29:44.673793670 +0100 +@@ -67,13 +67,13 @@ typedef void (APIENTRY *FGH_PFNGLENABLEV + typedef void (APIENTRY *FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint); + typedef void (APIENTRY *FGH_PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); + +-FGH_PFNGLGENBUFFERSPROC fghGenBuffers; +-FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers; +-FGH_PFNGLBINDBUFFERPROC fghBindBuffer; +-FGH_PFNGLBUFFERDATAPROC fghBufferData; +-FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray; +-FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray; +-FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer; ++extern FGH_PFNGLGENBUFFERSPROC fghGenBuffers; ++extern FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers; ++extern FGH_PFNGLBINDBUFFERPROC fghBindBuffer; ++extern FGH_PFNGLBUFFERDATAPROC fghBufferData; ++extern FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray; ++extern FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray; ++extern FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer; + + # endif + diff --git a/package/freeglut/patches/patch-src_fg_version_h b/package/freeglut/patches/patch-src_fg_version_h new file mode 100644 index 000000000..6bb5f6d69 --- /dev/null +++ b/package/freeglut/patches/patch-src_fg_version_h @@ -0,0 +1,16 @@ +--- freeglut-3.2.1.orig/src/fg_version.h 2014-08-18 04:00:40.000000000 +0200 ++++ freeglut-3.2.1/src/fg_version.h 2021-11-02 09:37:27.466889937 +0100 +@@ -37,11 +37,11 @@ + #endif + + #ifndef VERSION_MINOR +-#define VERSION_MINOR 0 ++#define VERSION_MINOR 2 + #endif + + #ifndef VERSION_PATCH +-#define VERSION_PATCH 0 ++#define VERSION_PATCH 1 + #endif + + #endif -- cgit v1.2.3