EGL: separate config and context code
[freeglut] / src / egl / fg_init_egl.c
index 1bd4b14..c6ceb63 100644 (file)
@@ -47,6 +47,12 @@ void fgPlatformInitialize( const char* displayName )
   if (!eglInitialize(fgDisplay.pDisplay.egl.Display, NULL, NULL))
     fgError("eglInitialize: error %x\n", eglGetError());
 
+# ifdef GL_VERSION_1_1  /* or later */
+  eglBindAPI(EGL_OPENGL_API);
+# else
+  eglBindAPI(EGL_OPENGL_ES_API);
+# endif
+
   // fgDisplay.ScreenWidth = ...;
   // fgDisplay.ScreenHeight = ...;
   // fgDisplay.ScreenWidthMM = ...;