title: Opengl es 2.0 without egl on desktop (windows)
body: <p>I have a simple program on windows using visual studios 2008. </p>
  
  <p>In my code i use gl functions i.e #include GLES2/gl2.h and also #include EGL/egl.h</p>
  
  <p>In the code i use EGL for initialization for context. which is shown below.</p>
  
  <p>It creates a window and CreateEGLContext. </p>
  
  <p>I am not displaying my result on the screen. but storing in memory so i am not swapping display and surface buffer.</p>
  
  <p>My issues you i want to remove egl.h from this code how is it possible.</p>
  
  <p>Can anyone give me any idea. Thank you in advance</p>
  
  <pre><code>GLboolean  CreateWindow1 ( ESContext *esContext, const char* title, GLint width, GLint height,      GLuint flags )
  {
     GLuint attribList[] =
           {
        EGL_RED_SIZE,       5,
       EGL_GREEN_SIZE,     6,
     EGL_BLUE_SIZE,      5,
     EGL_ALPHA_SIZE,     (flags &amp; ES_WINDOW_ALPHA) ? 8 : EGL_DONT_CARE,
     EGL_DEPTH_SIZE,     (flags &amp; ES_WINDOW_DEPTH) ? 8 : EGL_DONT_CARE,
     EGL_STENCIL_SIZE,   (flags &amp; ES_WINDOW_STENCIL) ? 8 : EGL_DONT_CARE,
     EGL_SAMPLE_BUFFERS, (flags &amp; ES_WINDOW_MULTISAMPLE) ? 1 : 0,
     EGL_NONE
    };
  
     if ( esContext == NULL )
    {
       return GL_FALSE;
    }
  
    esContext-&gt;width = width;
    esContext-&gt;height = height;
  
    if ( !WinCreate ( esContext, title) )
      {
      return GL_FALSE;
      }
  
  
       if ( !CreateEGLContext ( esContext-&gt;hWnd,  &amp;esContext-&gt;eglDisplay,  &amp;esContext-&gt;eglContext,    &amp;esContext-&gt;eglSurface,
                      attribList) )
    {
    return GL_FALSE;
    }
  
  
    return GL_TRUE;
   }
  </code></pre>
  
  <p>My answer is the solution i assume. or we can make our own framework if we want to or use any other framework :)</p>
  
  <p>@Nicol Bolas: Thank you very much for your edits. I add OpenGL to my questions because someone doing OpenGL understand OpenGL ES as its a sub APL of OpenGL. I suggest you do better edits which would help. I lost ability to post question before of your multiple edits </p>