title: What is the correct way to get OpenCL to play nice with OpenGL in Qt5?
body: <p>I have found several unofficial sources for how to get OpenCL to play nice with OpenGL and Qt5, each with different levels of complexity:</p>
  
  <ul>
  <li><a href="https://github.com/smistad/Qt-OpenGL-OpenCL-Interoperability" rel="nofollow">https://github.com/smistad/Qt-OpenGL-OpenCL-Interoperability</a></li>
  <li><a href="https://github.com/petoknm/QtOpenCLGLInterop" rel="nofollow">https://github.com/petoknm/QtOpenCLGLInterop</a></li>
  <li><a href="http://www.krazer.com/?p=109" rel="nofollow">http://www.krazer.com/?p=109</a></li>
  </ul>
  
  <p>Having these examples is nice, however they don't answer the following question: What exact steps are the <em>minimum</em> required to have a <strong>Qt5</strong> widgets program display the result of a calculation made in <strong>OpenCL kernel</strong> and then transferred directly to attached <strong>OpenGL context</strong> initiated by <strong>Qt5</strong>?</p>
  
  <p>Sub-questions include:</p>
  
  <ul>
  <li>What is the correct way to expose the OpenGL context in Qt5 to OpenCL?</li>
  <li>How do I initiate my Qt5 app in the first place to make sure that the OpenGL context is correctly set up for use with OpenCL?</li>
  <li>How should OpenCL be initiated to be compatible with the OpenGL context in Qt5?</li>
  <li>What quirks must I look out for to have this working across the platforms that Qt5 supports?</li>
  <li>Is there such a thing as an "official" way to do this, or is Digia working on one?</li>
  </ul>
  
  <p>Note, I am primarily interested in using OpenGL as a widget as opposed to a window/full-screen.</p>