title: Qt 5.3. QT_OPENGL_ES_2 always defined
body: <p>I want to use desktop OpenGL in my project. So i'm build Qt from source code with the following options:</p>
  
  <pre><code>configure -nomake examples -nomake tests -opengl desktop -no-angle
  </code></pre>
  
  <p>Then i adapt the code from that example: <a href="http://qt-project.org/doc/qt-5/qtgui-openglwindow-example.html" rel="nofollow">OpenGL Window Example</a></p>
  
  <p>Below is critical part:</p>
  
  <pre><code>OpenGLWindow::OpenGLWindow(QWindow *parent)
  : QWindow(parent)
  , m_context(0) {
      setSurfaceType(QWindow::OpenGLSurface); 
  }
  
  ...................
  
  void OpenGLWindow::exposeEvent(QExposeEvent*) {
  if (isExposed())
  {
      if (!m_context) {
          m_context = new QOpenGLContext(this);
          m_context-&gt;setFormat(requestedFormat());
          m_context-&gt;create();
  
          m_context-&gt;makeCurrent(this);
          initializeOpenGLFunctions();
          initialize();
          m_context-&gt;doneCurrent();
      }       
      render();
  } }
  .......................
  </code></pre>
  
  <p><code>initialize()</code> function of derived class uses some opengl methods, for example <code>glBindBuffer</code>. All works fine. But when I decide use use <code>GL_PIXEL_UNPACK_BUFFER</code> with <code>glBindBuffer</code>, I got error <code>GL_INVALID_ENUM</code>. In debug session I can see that</p>
  
  <pre><code>inline void QOpenGLFunctions::glBindBuffer(GLenum target, GLuint buffer)
  </code></pre>
  
  <p>uses <code>QT_OPENGL_ES_2</code> branch. GLES does not support <code>GL_PIXEL_UNPACK_BUFFER</code>.</p>
  
  <p>I try to undefine <code>QT_OPENGL_ES_2</code> in project settings. Also i try define <code>QT_NO_OPENGL_ES_2</code>. With no success. </p>
  
  <p>Is there any ways undefine <code>QT_OPENGL_ES_2</code>?</p>