bkloppenborg / liboi

OpenCL Interferometry Library
https://github.com/bkloppenborg/liboi/wiki
GNU Lesser General Public License v3.0
5 stars 6 forks source link

liboi assumes OpenGL is always wanted. #27

Closed bkloppenborg closed 11 years ago

bkloppenborg commented 11 years ago

The COpenCL::Init function cl_context_properties variable assumes that OpenGL is always wanted; however, it is conceivable that liboi could be used from a console application with no access to a GUI. This property should be pushed upstream and specified by the application developer, rather than assumed in the library.

bkloppenborg commented 11 years ago

In f55ea5665895a2a12978c2033405892a6b1e28e9 I added code to automatically detect if the current context has OpenGL enabled. If this is the case, a context with OpenGL + OpenCL interoperability will automatically be created. If you do not want OpenGL capabilities, simply don't initialize an OpenGL context.