diff --git a/components/raybri/ios/raybriEGL.h b/components/raybri/ios/raybriEGL.h index 259e4ec..d2ae6d3 100644 --- a/components/raybri/ios/raybriEGL.h +++ b/components/raybri/ios/raybriEGL.h @@ -29,12 +29,12 @@ bool raybriEGLInit( EGLContext *ctx, EGLDisplay *display ){ - display = eglGetDisplay(EGL_DEFAULT_DISPLAY); - if (display == EGL_NO_DISPLAY) { + *display = eglGetDisplay(EGL_DEFAULT_DISPLAY); + if (*display == EGL_NO_DISPLAY) { return false; } - if (eglInitialize(display, NULL, NULL) == EGL_FALSE) { + if (eglInitialize(*display, NULL, NULL) == EGL_FALSE) { return false; } @@ -44,14 +44,14 @@ bool raybriEGLInit( EGLint cfgCount = 0; if ( - eglChooseConfig(display, RAYBRI_EGL_CFG, &cfg, 1, &cfgCount) == EGL_FALSE || + eglChooseConfig(*display, RAYBRI_EGL_CFG, cfg, 1, &cfgCount) == EGL_FALSE || cfgCount < 1 ) { return false; } - ctx = eglCreateContext(display, cfg, EGL_NO_CONTEXT, RAYBRI_EGL_CTX); - if (ctx == EGL_NO_CONTEXT) { + *ctx = eglCreateContext(*display, *cfg, EGL_NO_CONTEXT, RAYBRI_EGL_CTX); + if (*ctx == EGL_NO_CONTEXT) { return false; } @@ -65,15 +65,15 @@ bool raybriEGLResetSurface( EGLSurface *surface ) { // Destroy previous surface - if (surface != EGL_NO_SURFACE) { - eglDestroySurface(display, surface); - surface = EGL_NO_SURFACE; + if (*surface != EGL_NO_SURFACE) { + eglDestroySurface(*display, *surface); + *surface = EGL_NO_SURFACE; } // Create new surface // ANGLE on iOS takes a CALayer as the native window - surface = eglCreateWindowSurface(display, cfg, (EGLNativeWindowType)caLayer, NULL); - if (surface == EGL_NO_SURFACE) { + *surface = eglCreateWindowSurface(*display, *cfg, (EGLNativeWindowType)caLayer, NULL); + if (*surface == EGL_NO_SURFACE) { return false; }