diff --git auto/src/glewinfo_tail.c auto/src/glewinfo_tail.c
index 4d45538..808e206 100644
|
|
GLboolean glewCreateContext (struct createParams *params) |
448 | 448 | if (error) return GL_TRUE; |
449 | 449 | error = CGLCreateContext(pf, NULL, &ctx); |
450 | 450 | if (error) return GL_TRUE; |
451 | | CGLReleasePixelFormat(pf); |
| 451 | CGLDestroyPixelFormat(pf); |
452 | 452 | octx = CGLGetCurrentContext(); |
453 | 453 | error = CGLSetCurrentContext(ctx); |
454 | 454 | if (error) return GL_TRUE; |
… |
… |
GLboolean glewCreateContext (struct createParams *params) |
462 | 462 | void glewDestroyContext () |
463 | 463 | { |
464 | 464 | CGLSetCurrentContext(octx); |
465 | | CGLReleaseContext(ctx); |
| 465 | CGLDestroyContext(ctx); |
466 | 466 | } |
467 | 467 | |
468 | 468 | /* ------------------------------------------------------------------------ */ |
diff --git config/Makefile.darwin config/Makefile.darwin
index 8030f05..ccae51c 100644
|
|
|
1 | | GLEW_DEST = /usr/local |
| 1 | GLEW_DEST ?= /usr/local |
2 | 2 | NAME = $(GLEW_NAME) |
3 | 3 | CC = cc |
4 | 4 | LD = cc |
5 | 5 | CFLAGS.EXTRA += -dynamic -fno-common |
6 | | CFLAGS.EXTRA += -pedantic |
7 | 6 | CFLAGS.EXTRA += -fPIC |
8 | | LDFLAGS.EXTRA = |
| 7 | CFLAGS.EXTRA += $(CFLAGS.ARCH) |
| 8 | LDFLAGS.EXTRA = $(LDFLAGS.ARCH) |
9 | 9 | ifneq (undefined, $(origin GLEW_APPLE_GLX)) |
10 | 10 | CFLAGS.EXTRA += -std=c99 |
11 | | CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX' |
12 | | LDFLAGS.GL = -L/usr/X11R6/lib -lGL -lX11 |
| 11 | CFLAGS.EXTRA += -I/opt/local/include -D'GLEW_APPLE_GLX' |
| 12 | LDFLAGS.GL = -L/opt/local/lib -lGL -lX11 |
13 | 13 | else |
14 | 14 | CFLAGS.EXTRA += -std=c89 |
15 | 15 | GLEW_NO_GLU = -DGLEW_NO_GLU |
diff --git config/Makefile.darwin-gcc6 config/Makefile.darwin-gcc6
index ecb61b3..fb5a887 100644
diff --git src/glewinfo.c src/glewinfo.c
index 882654d..7b08c11 100644
|
|
GLboolean glewCreateContext (struct createParams *params) |
16731 | 16731 | if (error) return GL_TRUE; |
16732 | 16732 | error = CGLCreateContext(pf, NULL, &ctx); |
16733 | 16733 | if (error) return GL_TRUE; |
16734 | | CGLReleasePixelFormat(pf); |
| 16734 | CGLDestroyPixelFormat(pf); |
16735 | 16735 | octx = CGLGetCurrentContext(); |
16736 | 16736 | error = CGLSetCurrentContext(ctx); |
16737 | 16737 | if (error) return GL_TRUE; |
… |
… |
GLboolean glewCreateContext (struct createParams *params) |
16745 | 16745 | void glewDestroyContext () |
16746 | 16746 | { |
16747 | 16747 | CGLSetCurrentContext(octx); |
16748 | | CGLReleaseContext(ctx); |
| 16748 | CGLDestroyContext(ctx); |
16749 | 16749 | } |
16750 | 16750 | |
16751 | 16751 | /* ------------------------------------------------------------------------ */ |
diff --git src/visualinfo.c src/visualinfo.c
index 99e8c63..2382d98 100644
|
|
GLboolean CreateContext (GLContext* ctx) |
1154 | 1154 | if (error) return GL_TRUE; |
1155 | 1155 | error = CGLCreateContext(pf, NULL, &ctx->ctx); |
1156 | 1156 | if (error) return GL_TRUE; |
1157 | | CGLReleasePixelFormat(pf); |
| 1157 | CGLDestroyPixelFormat(pf); |
1158 | 1158 | ctx->octx = CGLGetCurrentContext(); |
1159 | 1159 | error = CGLSetCurrentContext(ctx->ctx); |
1160 | 1160 | if (error) return GL_TRUE; |
… |
… |
void DestroyContext (GLContext* ctx) |
1165 | 1165 | { |
1166 | 1166 | if (NULL == ctx) return; |
1167 | 1167 | CGLSetCurrentContext(ctx->octx); |
1168 | | if (NULL != ctx->ctx) CGLReleaseContext(ctx->ctx); |
| 1168 | if (NULL != ctx->ctx) CGLDestroyContext(ctx->ctx); |
1169 | 1169 | } |
1170 | 1170 | |
1171 | 1171 | /* ------------------------------------------------------------------------ */ |