Monday, November 26, 2012

Open GL annoyances

I wanted to show my co-worker Ryan the work I'd done with the noise functions over the weekend, since he's also interested in graphics development.  I grabbed the JOCL and JOGL libraries and downloaded the Demo code from github, set up everything in Eclipse and...

Failure.  The OpenCL library refuses to set up a shared buffer on my Mac.  "Oh well" I though, "I can still show him on my work desktop".    Spent a few minute replicating the same environment there and...

More failure.  The CL subsystem still refuses to create a shared buffer, though it appears that this has something to do with Mesa.

Granted, neither of these machines is exactly on the bleeding edge or possesses a GPU, but they should still be able to fall back to the CPU for operations.  I suppose I could try porting the noise functions out of OpenCL and into a vertex shader, but I can't really spend that kind of time showing off to my coworkers during work hours.

I guess I'll try attacking the Mac side when I get home tonight if I have time.  It seems to revolve around setting the CL_CGL_SHAREGROUP_KHR value on the CLGL context.  Having a third party library to media the interaction with things like OpenGL and OpenCL is supposed to smooth away platform differences like this or at least report on a platform that didn't support a particular feature with a reasonable error message, one would hope.

No comments:

Post a Comment