EGL: separate config and context code
[freeglut] / src / egl / fg_display_egl.c
index 260b6ab..4bf3283 100644 (file)
@@ -32,5 +32,6 @@
 void fgPlatformGlutSwapBuffers( SFG_PlatformDisplay *pDisplayPtr, SFG_Window* CurrentWindow )
 {
   /* LOGI("Swap!"); */
-  eglSwapBuffers( pDisplayPtr->eglDisplay, CurrentWindow->Window.pContext.eglSurface );
+  if (!eglSwapBuffers(pDisplayPtr->egl.Display, CurrentWindow->Window.pContext.egl.Surface))
+    fgError("eglSwapBuffers: error %x\n", eglGetError());
 }