X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fegl%2Ffg_window_egl.c;h=110a38b43384b348a4a5af69978b32e8553bcf1b;hb=897c62cf034695c0f2224955550aadabb59ec342;hp=62980321956d0af5c27fbe8082a759394313aa30;hpb=67f242b7dd68bea7dea467f9b5265c8448b6655e;p=freeglut diff --git a/src/egl/fg_window_egl.c b/src/egl/fg_window_egl.c index 6298032..110a38b 100644 --- a/src/egl/fg_window_egl.c +++ b/src/egl/fg_window_egl.c @@ -27,6 +27,7 @@ #include "fg_internal.h" int fghChooseConfig(EGLConfig* config) { + EGLint num_config; EGLint attributes[32]; int where = 0; ATTRIB_VAL(EGL_SURFACE_TYPE, EGL_WINDOW_BIT); @@ -38,7 +39,7 @@ int fghChooseConfig(EGLConfig* config) { if (fgState.MajorVersion >= 2) { /* * Khronos does not specify a EGL_OPENGL_ES3_BIT outside of the OpenGL extension "EGL_KHR_create_context" and EGL 1.5. There are numerous references on the internet - * that say to use EGL_OPENGL_ES3_BIT (pre-EGL 1.5), followed by many saying they can't find it in any headers. In fact, the offical updated specification for EGL + * that say to use EGL_OPENGL_ES3_BIT (pre-EGL 1.5), followed by many saying they can't find it in any headers. In fact, the official updated specification for EGL * does not have any references to OpenGL ES 3.x. Tests have shown that EGL_OPENGL_ES2_BIT will work with ES 3.x. */ ATTRIB_VAL(EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT); @@ -68,7 +69,6 @@ int fghChooseConfig(EGLConfig* config) { ATTRIB_VAL(EGL_SAMPLES, (fgState.DisplayMode & GLUT_MULTISAMPLE) ? fgState.SampleNumber : 0); ATTRIB(EGL_NONE); - EGLint num_config; if (!eglChooseConfig(fgDisplay.pDisplay.egl.Display, attributes, config, 1, &num_config)) { fgWarning("eglChooseConfig: error %x\n", eglGetError()); @@ -94,7 +94,7 @@ EGLContext fghCreateNewContextEGL( SFG_Window* window ) { ATTRIB_VAL(EGL_CONTEXT_CLIENT_VERSION, fgState.MajorVersion); #ifdef EGL_CONTEXT_MINOR_VERSION if (fgDisplay.pDisplay.egl.MinorVersion >= 5) { - // EGL_CONTEXT_CLIENT_VERSION == EGL_CONTEXT_MAJOR_VERSION + /* EGL_CONTEXT_CLIENT_VERSION == EGL_CONTEXT_MAJOR_VERSION */ ATTRIB_VAL(EGL_CONTEXT_MINOR_VERSION, fgState.MinorVersion); } #endif