cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

twiig
Journeyman III

having OpenCL and OpenGL play nice.

cl/gl interoperability

long-story short, I have an application programmed using .NET CLI and wgl to create a standard OpenGL program.  After initializing the OpenGL context I setup (successfully) an OpenCL platform and context.  However, when I try to setup a device of type (CL_DEVICE_TYPE_GPU), I receive the CL_DEVICE_NOT_FOUND error code.  I believe I am setting this up in the proper order, but cannot verify this as all examples use GLUT for window/opengl context initialization.  When I switch it to ask for the CPU as the device, the program works smoothly.

Does anyone have any pointers that they could kick me, or know of any samples of this nature on the interweb?

Thanks.

0 Likes
4 Replies
genaganna
Journeyman III

Originally posted by: twiig long-story short, I have an application programmed using .NET CLI and wgl to create a standard OpenGL program.  After initializing the OpenGL context I setup (successfully) an OpenCL platform and context.  However, when I try to setup a device of type (CL_DEVICE_TYPE_GPU), I receive the CL_DEVICE_NOT_FOUND error code.  I believe I am setting this up in the proper order, but cannot verify this as all examples use GLUT for window/opengl context initialization.  When I switch it to ask for the CPU as the device, the program works smoothly.

Does anyone have any pointers that they could kick me, or know of any samples of this nature on the interweb?

Twiig,

        Could you please verify whether your driver installed properly or not?  Please run FindNumDevices. It should show number of gpu's available on your system.

0 Likes

sorry about the delay.  yes, everything is setup properly.  I can for instance enumerate the devices, which shows up 1 cpu and 1 gpu.  That is, until I create an OpenGL context, then there is no GPU available.

0 Likes

Has anyone out there got this working that might have an idea?

0 Likes

How are you setting up your OpenCL context and device?

0 Likes