EGLBoolean ret = EGL_FALSE;
EGLBoolean need_mc = EGL_FALSE;
GLGlueContext *gctx = NULL;
+ int api_version;
MY_MODULE_TSTATE *tstate = NULL;
goto finish;
}
- current_gl_api_version = ((EGL_packed_option *)
- gctx->real_ctx_option)->attrib_list.context_major_version;
- if (current_gl_api_version == COREGL_GLAPI_1)
- init_export(GL_FALSE, GL_TRUE);
- else
- init_modules();
+ api_version = ((EGL_packed_option *)
+ gctx->real_ctx_option)->attrib_list.context_major_version;
+ if (!current_gl_api_version)
+ current_gl_api_version = api_version;
+ else {
+ if (current_gl_api_version != api_version) {
+ if (api_version == COREGL_GLAPI_1)
+ init_export(GL_FALSE, GL_TRUE);
+ else
+ init_modules();
+ current_gl_api_version = api_version;
+ }
+ }
// Update references only when the contexts are different
if (tstate->cstate != gctx->cstate) {