QCLContextGL and Frustrations Therewith

>> Saturday, May 5, 2012

My OpenCL-OpenGL-Qt application works wonderfully in Linux, but AFDS wants presentations given using Windows computers. So I've spent a great deal of time trying to build my application on Windows 7 using Qt Creator. This means dealing with GLEW, DLL incompatibilities, and spaces in directory names like C:\Program Files. Yuck.



I finally got the application to compile, but the OpenCL-OpenGL interoperability doesn't work. The OpenGL component works and the OpenCL component works, but they're not talking to one another. I invoked clGetGLContextInfoKHR, which verified that my GPU is capable of OpenCL-OpenGL interoperability. I've tried every coding trick I can think of, but it's still not working.



As a last resort, I decided to try Qt's QCLContextGL class, which is supposed to make it easy to combine OpenCL and OpenGL. This is part of the QtOpenCL module, whose build instructions say that it should be compiled with the Qt source code instead of the Qt SDK. I downloaded the Qt source code and tried to build it, but the zlib.dll library was missing. I downloaded the zlib source code, compiled it with Visual Studio, and placed the *.lib/*.dll/*.h files in the right folders. But I'd misread the error. Qt Creator wants zdll.lib, not zlib.dll. Ha. Silly me.



After fixing all the problems with the source code compilation, I attempted to compile the QtOpenCL module. Qt Creator gave me two errors, and they're both described here. There are no solutions at this time, so I'm going to give up on Windows and stick to Linux. If anyone asks whether OpenGL-OpenCL interoperability works on Windows, I'll tell them to use GLUT instead of Qt. It hurts to type that.



Tomorrow, the wonderful BBC series Sherlock will be available for American audiences. I can't wait. I may be a moron, but I can still live vicariously through Sherlock Holmes.



0 comments:

Post a Comment

  © Blogger template Werd by Ourblogtemplates.com 2009

Back to TOP