/
glew-drop-glewContext.patch
83 lines (77 loc) · 3.14 KB
/
glew-drop-glewContext.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
diff -up quesoglc-0.7.2/include/internal.h~ quesoglc-0.7.2/include/internal.h
--- quesoglc-0.7.2/include/internal.h~ 2008-10-26 19:21:23.000000000 +0100
+++ quesoglc-0.7.2/include/internal.h 2017-02-02 21:51:35.932747442 +0100
@@ -347,9 +347,6 @@ extern void __glcSaveGLState(__GLCglStat
extern void __glcRestoreGLState(__GLCglState* inGLState,
__GLCcontext* inContext, GLboolean inAll);
-/* Function for GLEW so that it can get a context */
-GLEWAPI GLEWContext* glewGetContext(void);
-
#ifndef HAVE_TLS
/* This function initializes the thread management of QuesoGLC when TLS is not
* available. It must be called once (see the macro GLC_INIT_THREAD)
diff -up quesoglc-0.7.2/src/misc.c~ quesoglc-0.7.2/src/misc.c
--- quesoglc-0.7.2/src/misc.c~ 2009-03-24 14:29:01.000000000 +0100
+++ quesoglc-0.7.2/src/misc.c 2017-02-02 21:56:24.323417683 +0100
@@ -522,23 +522,6 @@ void __glcRestoreGLState(__GLCglState* i
glBindBufferARB(GL_ARRAY_BUFFER_ARB, inGLState->bufferObjectID);
}
-
-
-/* Function for GLEW so that it can get a context */
-GLEWAPI GLEWContext* glewGetContext(void)
-{
- __GLCcontext* ctx = GLC_GET_CURRENT_CONTEXT();
-
- if (!ctx) {
- __glcRaiseError(GLC_STATE_ERROR);
- return NULL;
- }
-
- return &ctx->glewContext;
-}
-
-
-
/* This function initializes the thread management of QuesoGLC when TLS is not
* available. It must be called once (see the macro GLC_INIT_THREAD)
*/
diff -up quesoglc-0.7.2/src/ocontext.h~ quesoglc-0.7.2/src/ocontext.h
--- quesoglc-0.7.2/src/ocontext.h~ 2009-01-18 13:29:04.000000000 +0100
+++ quesoglc-0.7.2/src/ocontext.h 2017-02-02 21:54:41.812429255 +0100
@@ -131,7 +131,6 @@ struct __GLCcontextRec {
__GLCarray* vertexIndices; /* Array of vertex indices */
__GLCarray* geomBatches; /* Array of geometric batches */
- GLEWContext glewContext; /* GLEW context for OpenGL extensions */
__GLCtexture texture; /* Texture for immediate mode rendering */
__GLCtexture atlas;
diff -up ./build/m4/ax_check_glew.m4.orig ./build/m4/ax_check_glew.m4
--- ./build/m4/ax_check_glew.m4.orig 2018-07-07 08:51:55.607727030 +0300
+++ ./build/m4/ax_check_glew.m4 2018-07-07 08:52:54.029538923 +0300
@@ -1,6 +1,6 @@
AC_DEFUN([AX_CHECK_GLEW], [
AC_CHECK_HEADER([GL/glew.h])
- AC_CHECK_LIB(GLEW, glewContextInit, , no_glew="yes")
+ AC_CHECK_LIB(GLEW, glewInit, , no_glew="yes")
if test -z "$no_glew"; then
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
@@ -9,7 +9,7 @@ AC_DEFUN([AX_CHECK_GLEW], [
# error
#endif
]],
- [[glewContextInit()]])],
+ [[glewInit()]])],
[LIBS="-lGLEW $LIBS"])
fi
])
diff -up quesoglc-0.7.2/tests/test6.c~ quesoglc-0.7.2/tests/test6.c
--- quesoglc-0.7.2/tests/test6.c~ 2008-06-05 00:14:51.000000000 +0200
+++ quesoglc-0.7.2/tests/test6.c 2017-02-02 22:21:13.684056957 +0100
@@ -44,8 +44,6 @@
#define QUESOGLC_MAJOR 0
#define QUESOGLC_MINOR 2
-GLEWAPI GLEWContext* glewGetContext(void);
-
static GLCchar* __glcExtensions1 = (GLCchar*) "GLC_QSO_attrib_stack"
" GLC_QSO_extrude GLC_QSO_hinting GLC_QSO_kerning GLC_QSO_matrix_stack"
" GLC_QSO_utf8 GLC_SGI_full_name";