memset(&funcs, 0, sizeof(funcs));
st_init_driver_functions(&funcs);
- ctx = _mesa_create_context(visual, shareCtx, &funcs, NULL);
+#if FEATURE_ES1
+ ctx = _mesa_create_context_for_api(API_OPENGLES,
+ visual, shareCtx, &funcs, NULL);
+#elif FEATURE_ES2
+ ctx = _mesa_create_context_for_api(API_OPENGLES2,
+ visual, shareCtx, &funcs, NULL);
+#else
+ ctx = _mesa_create_context_for_api(API_OPENGL,
+ visual, shareCtx, &funcs, NULL);
+#endif
/* XXX: need a capability bit in gallium to query if the pipe
* driver prefers DP4 or MUL/MAD for vertex transformation.