49 lines
2.2 KiB
Diff
49 lines
2.2 KiB
Diff
|
diff -urN freeglut-3.2.1.orig/src/fg_gl2.c freeglut-3.2.1/src/fg_gl2.c
|
||
|
--- freeglut-3.2.1.orig/src/fg_gl2.c 2014-06-01 04:24:47.000000000 -0500
|
||
|
+++ freeglut-3.2.1/src/fg_gl2.c 2020-08-04 19:54:14.348875031 -0500
|
||
|
@@ -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 -urN freeglut-3.2.1.orig/src/fg_gl2.h freeglut-3.2.1/src/fg_gl2.h
|
||
|
--- freeglut-3.2.1.orig/src/fg_gl2.h 2012-04-21 13:22:24.000000000 -0500
|
||
|
+++ freeglut-3.2.1/src/fg_gl2.h 2020-08-04 19:54:17.075914225 -0500
|
||
|
@@ -67,13 +67,13 @@
|
||
|
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
|
||
|
|