Using EGL and OpenGL 3.X instead of ES 3

Hello all,

I am new to OpenGL EGL and have a two part question I hope someone can help with.

  1. If I use OpenGL EGL and ES 3.2 but call eglBindAPI with EGL_OPENGL_API what happens within EGL? Does it bind to its default EGL_OPENGL_ES_API anyway?

The snippet of example code that follows illustrates my question:

#include <EGL/egl.h>
#include <GLES3/gl32.h>
...
EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
EGLint major, minor;
eglInitialize(display, &major, &minor);

// Bind to OpenGL API  
// - does EGL ignore this since we are using GLES3 calls ????
eglBindAPI(EGL_OPENGL_API);

// Choose EGL configuration
EGLint config_attribs[] = {
EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
    EGL_BLUE_SIZE, 8,
    EGL_GREEN_SIZE, 8,
    EGL_RED_SIZE, 8,
    EGL_DEPTH_SIZE, 8,
    EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
    EGL_NONE
};
EGLConfig config;
EGLint num_configs;
eglChooseConfig(display, config_attribs, &config, 1, &num_configs);

// Create EGL context
EGLint context_attribs[] = {
    EGL_CONTEXT_MAJOR_VERSION, 3,
    EGL_CONTEXT_MINOR_VERSION, 0,
    EGL_NONE
};
EGLContext context = eglCreateContext(display, config, EGL_NO_CONTEXT, context_attribs); 
....
// The following uses definitions in GLES3
GLuint vertex_shader = glCreateShader(GL_VERTEX_SHADER);
...
  1. I want to use EGL as the context but use OpenGL 3.x rather than using GLES (like the code above) for rendering offscreen (no visual window used), e.g., a triangle, is this possible? What headers would I need to include that would defines something like glCreateShader(GL_VERTEX_SHADER) which in the above code is defined in GLES3?

Sorry for the long email.

Thanks in advance for any help.