title: Load OpenGL function pointers using glad withing a QOpenGLWidget
body: <p>So I am reading up on some OpenGL and I want to use the QOpenGLWidget for drawing to maybe create some other helpful UI elements later. I am using <a href="https://github.com/Dav1dde/glad" rel="nofollow noreferrer">glad</a> for resolving the function pointers to OpenGL but I have no idea how to use Qt's getProcAddress function!</p>
  
  <p>Inside my QOpenGLWidget subclass' <code>initializeGL()</code> function I have tried:</p>
  
  <pre><code>if(gladLoadGLloader((GLADloadproc) currentContext()-&gt;getProcAddress) {}
  </code></pre>
  
  <p>but that did not work out since Qt's function is overloaded. When I use</p>
  
  <pre><code>if(gladLoadGL()) {}
  </code></pre>
  
  <p>it doesn't work either. My includes are:</p>
  
  <pre><code>#include &lt;glad\glad.h&gt;
  #include "OpenGLViewport.h"
  #include &lt;QDebug&gt;
  #include &lt;QOpenGLContext&gt;
  </code></pre>
  
  <p>I have searched Mr. Google and I've had a diligent look through the Qt documentation and found nothing. I want to use GLAD just so my rendering code is not bound to Qt too tightly, in case I want to switch later.</p>
  
  <p><strong>EDIT:</strong> I am aiming to use the noninstanced OpenGL functions with Qt (though the documentation recommends otherwise if I recall correctly). Because then I'd be able to seemlessly switch to GLFW for providing a window etc.</p>