EGL: reuse fgPlatformSetWindow for calling eglMakeCurrent

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1239 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
beuc 2012-04-15 18:45:54 +00:00
parent 782974c8cf
commit aef742b7c3

View File

@ -103,8 +103,7 @@ void fghPlatformOpenWindowEGL( SFG_Window* window )
EGLSurface surface = eglCreateWindowSurface(display, config, window->Window.Handle, NULL); EGLSurface surface = eglCreateWindowSurface(display, config, window->Window.Handle, NULL);
if (surface == EGL_NO_SURFACE) if (surface == EGL_NO_SURFACE)
fgError("Cannot create EGL window surface, err=%x\n", eglGetError()); fgError("Cannot create EGL window surface, err=%x\n", eglGetError());
if (eglMakeCurrent(display, surface, surface, window->Window.Context) == EGL_FALSE) fgPlatformSetWindow(window);
fgError("eglMakeCurrent: err=%x\n", eglGetError());
//EGLint w, h; //EGLint w, h;
//eglQuerySurface(display, surface, EGL_WIDTH, &w); //eglQuerySurface(display, surface, EGL_WIDTH, &w);