Recent posts

#81
LWJGL 2.9.3 + Slick2D

I am using the default mouse, I have not done anything else in the program. The mouse cursor is always has been working.
Now some user cannot see the cursor.
For me I can see it, it is the default windows cursor (arrow). Is it called the hardware cursor?
Should I make my own (software) cursor  and render it at the position of the system cursor?
#82
Lightweight Java Gaming Library / LWJGL and MacOSX
Last post by kevinpirola - June 25, 2023, 20:32:54
I am programming a game using LWJGL but I am having problems I think using OpenGL version 3.

I am following this tutorial: https://coffeebeancode.gitbook.io/lwjgl-game-design/

I am stuck at step 1 with a black window, no triangles no nothing.

I am running on a MacBook Pro late 2012 with High Sierra. I put these lines to make it work
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);


instead I get a
FATAL ERROR in native method: Thread[#1,main,5,main]: No context is current or a function that is not available in the current context was called. The JVM will abort execution.


It's really really simple the code, but I am unable to make it work and I am really stuck. What am I missing? what should I do?
#83
Vulkan / Re: 3.3.2 native JARs missing ...
Last post by sgold - June 25, 2023, 00:37:06
Thank you for those tips! I'll keep pushing forward with Vulkan and LWJGL ...
#84
Vulkan / Re: 3.3.2 native JARs missing ...
Last post by spasi - June 24, 2023, 15:35:32
The Vulkan bindings do not require natives to work. LWJGL calls the functions provided by the Vulkan loader/driver directly (via the org.lwjgl.system.JNI class, which lives in the core LWJGL library).

The native jars for macOS are there because macOS does not natively support Vulkan. They contain a build of MoltenVK, which is a Vulkan emulation layer over the Metal API.
#85
Vulkan / 3.3.2 native JARs missing at M...
Last post by sgold - June 24, 2023, 11:23:19
I'm trying to build a Vulkan app using Gradle and LWJGL v3.3.2 on Windows 11.
I get the following build error:

```console
> Error while evaluating property 'relativeClasspath' of task ':app:startScripts'.
   > Could not resolve all files for configuration ':app:runtimeClasspath'.
      > Could not find lwjgl-vulkan-3.3.2-natives-windows.jar (org.lwjgl:lwjgl-vulkan:3.3.2).
        Searched in the following locations:
            https://repo.maven.apache.org/maven2/org/lwjgl/lwjgl-vulkan/3.3.2/lwjgl-vulkan-3.3.2-natives-windows.jar
```

When I browse to https://repo.maven.apache.org/maven2/org/lwjgl/lwjgl-vulkan/3.3.2
I see there are natives for macos and macos-arm64, but not for Linux or Windows.

How should I obtain Linux/Windows native JARs for Vulkan?
#86
Bug Reports / RFE / Re: [BUG] Potential issue with...
Last post by foxel - June 21, 2023, 19:36:04
Ah thank you.  My mistake for not updating LWJGL on my build machine recently.
#87
Bug Reports / RFE / Re: [BUG] Potential issue with...
Last post by spasi - June 21, 2023, 18:14:27
Hey foxel,

Please upgrade to LWJGL 3.3.2. The Linux x64 build now only requires GLIBC 2.17 and GLIBCXX 3.4.19, or higher. See this for more details.
#88
Bug Reports / RFE / [BUG] Potential issue with Lin...
Last post by foxel - June 20, 2023, 21:49:25
Hello, I'm getting ready to release a LWJGL game on Steam, and had an interesting bug come up in the Steam forums:

https://steamcommunity.com/app/2277110/discussions/0/3816284554973125189/

Now, I am absolutely not an expert with compiling or packaging Linux libraries, so I can't really speak to what's going wrong here.  My game runs without issue on Ubuntu and SteamOS, so something about the poster's custom minified Linux is surfacing this, and I don't have a way to repro the crash.

I really don't have the Linux knowledge or time to be supporting custom Linux distros.  Is this something that could be fixed in an update to LWJGL?
#89
Ah, I had not noticed that while XrActionSuggestedBinding.create() returns a XrActionSuggestedBinding that XrActionSuggestedBinding.create(number) returns a Buffer. I was looking for a XrActionSuggestedBinding.Buffer.create(number) not finding it, and ending up creating something weird.

That simplifies things a lot. Thanks
#90
No, new Thing.Buffer(BufferUtils.createByteBuffer(Thing.SIZEOF)) is not the recommended way to do it. It works, but that constructor is there in case you already have some memory around and you need to "cast" it to a specific struct type.

Typically, you'd do:

Thing.Buffer myThings = Thing.create(10); // myThings is now a pointer to an array of 10 Thing structs


You can replace create with malloc/calloc for explicit memory management.