Ticket #61487: patch-glew-tiger-ppc.diff

File patch-glew-tiger-ppc.diff, 3.1 KB (added by kencu (Ken), 4 years ago)
  • auto/src/glewinfo_tail.c

    diff --git auto/src/glewinfo_tail.c auto/src/glewinfo_tail.c
    index 4d45538..808e206 100644
    GLboolean glewCreateContext (struct createParams *params) 
    448448  if (error) return GL_TRUE;
    449449  error = CGLCreateContext(pf, NULL, &ctx);
    450450  if (error) return GL_TRUE;
    451   CGLReleasePixelFormat(pf);
     451  CGLDestroyPixelFormat(pf);
    452452  octx = CGLGetCurrentContext();
    453453  error = CGLSetCurrentContext(ctx);
    454454  if (error) return GL_TRUE;
    GLboolean glewCreateContext (struct createParams *params) 
    462462void glewDestroyContext ()
    463463{
    464464  CGLSetCurrentContext(octx);
    465   CGLReleaseContext(ctx);
     465  CGLDestroyContext(ctx);
    466466}
    467467
    468468/* ------------------------------------------------------------------------ */
  • config/Makefile.darwin

    diff --git config/Makefile.darwin config/Makefile.darwin
    index 8030f05..ccae51c 100644
     
    1 GLEW_DEST = /usr/local
     1GLEW_DEST ?= /usr/local
    22NAME = $(GLEW_NAME)
    33CC = cc
    44LD = cc
    55CFLAGS.EXTRA += -dynamic -fno-common
    6 CFLAGS.EXTRA += -pedantic
    76CFLAGS.EXTRA += -fPIC
    8 LDFLAGS.EXTRA =
     7CFLAGS.EXTRA += $(CFLAGS.ARCH)
     8LDFLAGS.EXTRA = $(LDFLAGS.ARCH)
    99ifneq (undefined, $(origin GLEW_APPLE_GLX))
    1010CFLAGS.EXTRA += -std=c99
    11 CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
    12 LDFLAGS.GL = -L/usr/X11R6/lib -lGL -lX11
     11CFLAGS.EXTRA += -I/opt/local/include -D'GLEW_APPLE_GLX'
     12LDFLAGS.GL = -L/opt/local/lib -lGL -lX11
    1313else
    1414CFLAGS.EXTRA += -std=c89
    1515GLEW_NO_GLU = -DGLEW_NO_GLU
  • src/glewinfo.c

    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) 
    1673116731  if (error) return GL_TRUE;
    1673216732  error = CGLCreateContext(pf, NULL, &ctx);
    1673316733  if (error) return GL_TRUE;
    16734   CGLReleasePixelFormat(pf);
     16734  CGLDestroyPixelFormat(pf);
    1673516735  octx = CGLGetCurrentContext();
    1673616736  error = CGLSetCurrentContext(ctx);
    1673716737  if (error) return GL_TRUE;
    GLboolean glewCreateContext (struct createParams *params) 
    1674516745void glewDestroyContext ()
    1674616746{
    1674716747  CGLSetCurrentContext(octx);
    16748   CGLReleaseContext(ctx);
     16748  CGLDestroyContext(ctx);
    1674916749}
    1675016750
    1675116751/* ------------------------------------------------------------------------ */
  • src/visualinfo.c

    diff --git src/visualinfo.c src/visualinfo.c
    index 99e8c63..2382d98 100644
    GLboolean CreateContext (GLContext* ctx) 
    11541154  if (error) return GL_TRUE;
    11551155  error = CGLCreateContext(pf, NULL, &ctx->ctx);
    11561156  if (error) return GL_TRUE;
    1157   CGLReleasePixelFormat(pf);
     1157  CGLDestroyPixelFormat(pf);
    11581158  ctx->octx = CGLGetCurrentContext();
    11591159  error = CGLSetCurrentContext(ctx->ctx);
    11601160  if (error) return GL_TRUE;
    void DestroyContext (GLContext* ctx) 
    11651165{
    11661166  if (NULL == ctx) return;
    11671167  CGLSetCurrentContext(ctx->octx);
    1168   if (NULL != ctx->ctx) CGLReleaseContext(ctx->ctx);
     1168  if (NULL != ctx->ctx) CGLDestroyContext(ctx->ctx);
    11691169}
    11701170
    11711171/* ------------------------------------------------------------------------ */