X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fegl%2Ffg_init_egl.c;h=f0889a659c95be4c28c092150e42721760e3368c;hb=d9ec500965f477d0cb859dc09f0bc540f7ae0730;hp=361c73ce0b7bcd7aa4f70cf46b2a0e5530f441ee;hpb=71b402b58a952aeec8d902edeec8954464f10323;p=freeglut diff --git a/src/egl/fg_init_egl.c b/src/egl/fg_init_egl.c index 361c73c..f0889a6 100644 --- a/src/egl/fg_init_egl.c +++ b/src/egl/fg_init_egl.c @@ -39,7 +39,7 @@ void fghPlatformInitializeEGL() FREEGLUT_INTERNAL_ERROR_EXIT(fgDisplay.pDisplay.egl.Display != EGL_NO_DISPLAY, "No display available", "fgPlatformInitialize"); - if (eglInitialize(fgDisplay.pDisplay.egl.Display, NULL, NULL) != EGL_TRUE) + if (eglInitialize(fgDisplay.pDisplay.egl.Display, &fgDisplay.pDisplay.egl.MajorVersion, &fgDisplay.pDisplay.egl.MinorVersion) != EGL_TRUE) fgError("eglInitialize: error %x\n", eglGetError()); # ifdef GL_VERSION_1_1 /* or later */ @@ -59,6 +59,8 @@ void fghPlatformCloseDisplayEGL() if (fgDisplay.pDisplay.egl.Display != EGL_NO_DISPLAY) { eglTerminate(fgDisplay.pDisplay.egl.Display); fgDisplay.pDisplay.egl.Display = EGL_NO_DISPLAY; + fgDisplay.pDisplay.egl.MajorVersion = 0; + fgDisplay.pDisplay.egl.MinorVersion = 0; } }