+#ifdef GL_ES_VERSION_2_0
+ /*
+ * As GLES 3.0 is backwards compatible with GLES 2.0, we set 2.0 as default unless the user states a different version.
+ * This updates the context attributes and lets us check that the correct version was set when we query it after creation.
+ */
+ int gles2Ver = fgState.MajorVersion <= 2 ? 2 : fgState.MajorVersion;
+ ctx_attribs[1] = gles2Ver;
+#endif