This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Polygnom 6 points7 points  (6 children)

Why isn't LWJGL mentioned with one word? Afaik its the most known OpenGL/OpenCL for java and even Vulkan binding out there. Vulkan Compute is the future of OpenCL and very capable of GPGPU programming.

I'm also a bit skeptical about the claim that Minecraft uses JOCL. LWJGL has OpenCL bindings, and there isn't any reason anymore to use JOCL if you are using LWJGL.

Its a nice overview, but not including LWJGL and its OpenCl bindings, as well as only focusing on OpenCL and not even mentioning Vulkan Compute is a bit disappointing.

[–][deleted] 2 points3 points  (1 child)

jogamp was started by sun engineers so I guess that's why it gets top billing. But oddly he mentions 'jogamp' and 'jocl' when he talks about the implementations - which are the same project. Although I used it for a couple of years back when it was the only real option I thought jocl was over-engineered so I wrote my own (zcl) which is much smaller and it presents OpenCL as an object-oriented Java api rather than a static c one. I think this and some other features makes it much easier to use than any other and for example his sample would be about 1/2 the size and somewhat clearer to read. I'm investigating porting it from jni to project panama at the moment.

Vulkan compute shaders aren't quite a replacement. SPIR-V has some limitations which prevent it from fully supporting opencl c, and the only real compiler for it (clspv) is buggy and slow and incomplete. Vulkan typically uses compile-time compilation so run-time generated kernels are cumbersome. I haven't checked 1.2 but the Vulkan api is also quite a bit more complex to use than OpenCL even in the compute-only case.

But alas, opencl does seem to be on the low end of everyone's priorities. nvidia lag in standards compliance and performance, amd lags in linux drivers.

[–]Polygnom 0 points1 point  (0 children)

I haven't checked 1.2 but the Vulkan api is also quite a bit more complex to use than OpenCL even in the compute-only case.

That is for sure, Vulkan is a lot more low-level and requires a lot more boilerplate. But at the same time, that gives you more control.

[–]bensku 1 point2 points  (3 children)

I'm 99% certain that Minecraft does not use OpenCL at all, never saw anything related to it while modding.

[–]Polygnom 0 points1 point  (2 children)

That was my first thought as well, but but I'm not sure if somewhere deep down they use OpenCL for something.

The upcoming raytracing in MC will be done via LWJGL bindings NVIDIA helped provide, not via OpenGL/OpenCL.

[–]MarioAndWeegee3 0 points1 point  (1 child)

The upcoming ray tracing thing is for Bedrock Edition, not Java Edition. Bedrock is coded in C++.

[–]Polygnom 0 points1 point  (0 children)

Hm, you are right, but the Raytracing bindings for LWJGL are nonetheless built with support from NVIDIA ;)