I will preface this by saying that you should not be using Emscripten like this. Personally, I would use GLFW3 and GLEW to manage the windowing and extensions. When using emcc or em++ (emscripten compilers) they will change the windowing calls into webgl context creation and what not.
But now to the answer. If you're not interested in using GLFW3, you're going to have to use specific Emscripten methods. There isn't any global "gl-object."
If you're looking to enable all extensions you can use the following:
EM_BOOL enableExtensionsByDefault
If "true", all GLES2-compatible non-performance-impacting WebGL
extensions will automatically be enabled for you after the
context has been created.
If "false", no extensions are enabled
by default, and you need to manually call
"emscripten_webgl_enable_extension()" to enable each extension
that you want to use. Default value: "true".
If you are looking to enable a specific extension you can use the following:
EMSCRIPTEN_WEBGL_CONTEXT_HANDLE emscripten_webgl_get_current_context()
Returns the currently active WebGL rendering context, or 0 if no
context is active. Calling any WebGL functions when there is no
active rendering context is undefined and may throw a JavaScript
exception.
Returns:
Return type: "EMSCRIPTEN_WEBGL_CONTEXT_HANDLE"
in order to get the WebGL Context Handle and pass that into the following method:
EM_BOOL emscripten_webgl_enable_extension(EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context, const char *extension)
Enables the given extension on the given context.
Parameters:
context (EMSCRIPTEN_WEBGL_CONTEXT_HANDLE) -- The WebGL
context on which the extension is to be enabled.
extension (*const char**) -- A string identifying the WebGL extension. For example "OES_texture_float".
Returns:
EM_TRUE if the given extension is supported by the context, and
EM_FALSE if the extension was not available.
Return type: "EM_BOOL"
All the information you need is here:
http://kripken.github.io/emscripten-site/docs/api_reference/html5.h.html#html5-h