Hello Guest

Recent Posts

Pages: [1] 2 3 ... 10
Lightweight Java Gaming Library / Re: Indie Fighting Game using LWJGL!
« Last post by cpope9141 on February 19, 2024, 19:19:12 »
The February release of Area Zero (v0.9.0) is now available for download: https://ephemeraltechnicalarts.com/area-zero

Release Notes:
0.9.0 (02/18/2024)
  1. All characters now have an air special attack. This attack is activated by pressing the special attack button while airborne.
  2. All of Richard's animations are color mapped.
  3. All of Niven's attack animations are color mapped.
  4. Get up animations (wake up) can be canceled into any grounded special attack.
  5. Down specials can now be activated immediately from standing state.
  6. Tutorials improved and expanded to include new attacks and features.
  7. New color palettes added for each playable character.
  8. Wall bounce tweaked to be more consistent.
  9. Fixed sound effect issue related to characters in hit stun.
  10. Fixed linked animation issue.
Lightweight Java Gaming Library / how to make a 3d camera in java and LWJGL
« Last post by shreyank6189 on February 07, 2024, 14:29:43 »
How do I make a 3d camera in java and lwgl that can look around with mouse and can move around with key binds, like roblox studio's workspace camera.

Cheers, Shreyank6189
OpenGL / how to make a 3d camera in java and LWJGL
« Last post by shreyank6189 on February 07, 2024, 14:28:37 »
How do I make a 3d camera in Java and LWGL that can look around with the mouse and can move around with key binds, like Roblox studio's workspace camera? I could also use Opengl with lwjgl

Cheers, shreyank6189  8)
LWJGL Documentation / Re: Moving circle emaple wanted
« Last post by spasi on February 02, 2024, 09:08:31 »
Hey Dmytro,

You can find some fairly advanced demos here: https://github.com/LWJGL/lwjgl3-demos
LWJGL Documentation / Moving circle emaple wanted
« Last post by Dmytro on February 02, 2024, 00:02:09 »

I'm pretty new to LWJGL world.
At this moment I installed everything and sucessfully run example from title page.
But I need more complex example to start develop my project.

Ideally it should be a simple application of bouncing ball or similar. Later I will develop a simulation of planets with field of gravity.
The computation engine is ready need only high-performance graphics. I suppose LWJGL is wnat I need.

Thanks and Regrads,

Hello Spasi :)

Thank you very much.
That worked great !
Just added this:
Code: [Select]
while (!glfwWindowShouldClose(handle)) glfwWaitEvents();
Hey aerodash,

Please see https://github.com/LWJGL/lwjgl3/blob/master/modules/samples/src/test/java/org/lwjgl/demo/stb/Vorbis.java for a working example of multithreaded UI (i.e. the event loop), rendering and audio.

The recommended approach is to use the main thread for the event loop (with glfwWaitEvents) so that you're always consuming UI events, then spawn secondary thread(s) for rendering and audio. This works nicely on macOS too (where the event loop must always be on the first thread of the process). Rendering never stops, even while dragging the window.
Hello :)

I am trying to do all rendering on a separate thread.
What I am doing right now is the following:
Code: [Select]
long handle = glfwCreateWindow(800, 600, "Demo", NULL, NULL);
new Thread(() -> {

  int shader = loadShaders();
  int vao = createVao();

  while (!glfwWindowShouldClose(handle)) {
    glDrawArrays(GL_TRIANGLES, 0, 3);


With the above code, rendering works as I can see a triangle but the window is not responsive.
When moving or clicking on the window the process would stop responding.
Lightweight Java Gaming Library / Re: Indie Fighting Game using LWJGL!
« Last post by cpope9141 on January 20, 2024, 06:13:29 »
The January release of Area Zero (v0.8.0) is now available for download: https://ephemeraltechnicalarts.com/area-zero

Release Notes:
0.8.0 (01/18/2024)
  1.Ex Cancel routes expanded:
    a. Standing specials can be canceled into any other standing special for 2 blue meters.
    b. Special attacks tuned to accommodate new routes.
  2. Move lists now available for all characters through the pause menu.
  3. Universals established:
    a. Every character has a back + HP command normal.
    b. Every character can chain together their LP, HP and back + HP attacks.
    c. Every character's back + HP can cancel into special or super.
  4. Advanced tutorial mode added; Covers universals, cancels and Hold-to-Cancel feature.
  5. Credits screen added and Patrons are acknowledged.
  6. Richard's attack animations shaded and colored.
  7. Additional animations for Richard and Niven shaded and colored.
Lightweight Java Gaming Library / Re: LWJGL + JavaFX + MacOS
« Last post by Michael Tetzlaff on January 12, 2024, 20:28:55 »
That works, thanks.

Good to know about DriftFX.  Currently I'm just using framebuffer reads to put the graphics output into the JavaFX window and it works fine, but if I have time to rewrite the graphics backend of my project, it would be nice to have something more integrated.

For anyone else finding this, here's a bit more about what discovered with regards to the relationship between LWJGL, JavaFX, and MacOS:

  • * MacOS requires that all windowing operations happen on the first thread created.  This affects both JavaFX and the GLFW library that LWJGL uses to create windows and graphics contexts.  It gets tricky because both libraries need to be able to use that single thread for all of their windowing-related calls.
  • * JavaFX seems to manage this using some native code that ensures that the JavaFX application thread IS the first thread (so when that Java thread is "started" it's really just running within that first thread).  I'm not 100% sure this is correct, but it's the explanation most consistent with my testing and debugging efforts.
  • * Using -xStartOnFirstThread solves the problem for GLFW by making the Java main() method run on the first thread, but messes up JavaFX as it's no longer able to put the JavaFX application thread on the main thread.
  • * The solution is to NOT use xStartOnFirstThread and use glfw_async, as spasi suggested. I'm not sure entirely how this works, but I'm guessing that, like JavaFX, it has a way of injecting GLFW calls into the first thread.  In addition, my program waits until JavaFX is initialized to start the GLFW thread (which may or may not matter).
  • * An alternative that I had just got working before I saw spasi's response is to put all GLFW calls on the JavaFX application thread, i.e. by putting them in Platform.runLater.  If you do this, then you don't nee to use glfw_async.  Once you have a handle for the GLFW context, that handle can be safely used for most graphics commands on any thread (so the JavaFX thread won't be blocked by graphics operations).  I'm going with spasi's solution though, rather than this, as it also solves other threading issues I encountered.
Pages: [1] 2 3 ... 10