LWJGL 3 - OpenCL support

Started by jrao, December 19, 2014, 17:33:09

Previous topic - Next topic

jrao

Hi,

I'm evaluating Java OpenCL library, and LWJGL seems to be pretty mature. However, when I try to follow the tutorial here: http://wiki.lwjgl.org/index.php?title=OpenCL_in_LWJGL, it doesn't work with LWJGL 3, since there's no CLContext and CLCommandQueue class. So I'm wondering:
1. Is LWJGL 3's OpenCL support completed?
2. If not, should I use LWJGL 2 for now? Version 2's last release is in 2013, seems a year old already.

Thanks

Kai

Hi,

LWJGL 3 is not released yet, because minor things can and did change in the past and as such and because of that the documentation is a bit lacking/behind.

But, you can have a look at the git sources: https://github.com/LWJGL/lwjgl3

Under src/tests/org/lwjgl/opencl and ../demo/opencl there are demos that are always in sync with the state of development.

Cheers,
Kai

Kai

Ah, and also more importantly that wiki site you mentioned, I think is actually the one for LWJGL 2.

The link "Wiki" on the lwjgl.org site at the bottom does not link to that, but to the github wiki: https://github.com/LWJGL/lwjgl3/wiki

The latter is meant for LWJGL 3.

spasi

Yes, LWJGL 3 has full OpenCL support, but it is not compatible with LWJGL 2. Most of the wrapper classes are gone in favor of plain long pointers, which avoids unnecessary GC pressure.

Also, note that even though LWJGL 2.9.2 was never released, you can download a nightly build here. It contains several fixes over version 2.9.1.

jrao

Thanks guys for the quick response, very helpful information, I'll try to follow the lwgjl3 test case first.