Mercurial > mxe-octave
diff src/freeglut-1-fixes.patch @ 6191:dba78afaaad1
glut: Update to v3.2.1
* src/freeglut.mk: update version, checksum, build with cmake
* src/freeglut-1-fixes.patch: update patch
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Sat, 30 Apr 2022 08:03:45 -0400 |
parents | 99516e73b368 |
children |
line wrap: on
line diff
--- a/src/freeglut-1-fixes.patch Sat Apr 23 10:08:21 2022 -0400 +++ b/src/freeglut-1-fixes.patch Sat Apr 30 08:03:45 2022 -0400 @@ -1,65 +1,48 @@ -This file is part of MXE. -See index.html for further information. - -Contains ad hoc patches for cross building. - -From 87a791a05687c7737d1c50381a0de30ba1acf96e Mon Sep 17 00:00:00 2001 -From: MXE -Date: Mon, 24 Oct 2011 09:40:10 +0200 -Subject: [PATCH] add pkg-config support - -based on -http://old.nabble.com/-PATCH--Add-pkgconfig-file-td23312302.html - -proposed to upstream -https://sourceforge.net/tracker/?func=detail&aid=3511842&group_id=1032&atid=101032 ---- - Makefile.am | 3 +++ - configure.ac | 1 + - glut.pc.in | 12 ++++++++++++ - 3 files changed, 16 insertions(+), 0 deletions(-) - create mode 100644 glut.pc.in - -diff --git a/Makefile.am b/Makefile.am -index 39c5628..b504bc6 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -68,3 +68,6 @@ dist-hook: +diff --git a/freeglut/freeglut/src/fg_gl2.c b/freeglut/freeglut/src/fg_gl2.c +index 38b0acbb..f79c432a 100644 +--- a/src/fg_gl2.c ++++ b/src/fg_gl2.c +@@ -27,6 +27,18 @@ + #include "fg_internal.h" + #include "fg_gl2.h" - libtool: $(LIBTOOL_DEPS) - $(SHELL) ./config.status --recheck ++#ifdef GL_ES_VERSION_2_0 ++/* Use existing functions on GLES 2.0 */ ++#else ++FGH_PFNGLGENBUFFERSPROC fghGenBuffers; ++FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers; ++FGH_PFNGLBINDBUFFERPROC fghBindBuffer; ++FGH_PFNGLBUFFERDATAPROC fghBufferData; ++FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray; ++FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray; ++FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer; ++#endif + -+pkgconfigdir = $(libdir)/pkgconfig -+pkgconfig_DATA = glut.pc -diff --git a/configure.ac b/configure.ac -index 15dc997..2f25bcb 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -119,5 +119,6 @@ AC_CONFIG_FILES([ - progs/demos/spaceball/Makefile - progs/demos/subwin/Makefile - src/Makefile -+ glut.pc - ]) - AC_OUTPUT -diff --git a/glut.pc.in b/glut.pc.in -new file mode 100644 -index 0000000..ea57c4a ---- /dev/null -+++ b/glut.pc.in -@@ -0,0 +1,12 @@ -+prefix=@prefix@ -+exec_prefix=@exec_prefix@ -+libdir=@libdir@ -+includedir=@includedir@/@PACKAGE@ -+ -+Name: glut -+Description: A freely licensed alternative to the GLUT library -+Version: @VERSION@ -+Libs: -L${libdir} -lglut -+Libs.private: -lglu32 -lopengl32 -lwinmm -lgdi32 -mwindows -+Cflags: -DFREEGLUT_STATIC -I${includedir} -+ --- -1.7.8 - + void FGAPIENTRY glutSetVertexAttribCoord3(GLint attrib) { + if (fgStructure.CurrentWindow != NULL) + fgStructure.CurrentWindow->Window.attribute_v_coord = attrib; +diff --git a/freeglut/freeglut/src/fg_gl2.h b/freeglut/freeglut/src/fg_gl2.h +index ab8ba5c7..fb3d4676 100644 +--- a/src/fg_gl2.h ++++ b/src/fg_gl2.h +@@ -67,13 +67,13 @@ typedef void (APIENTRY *FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); + 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 +