Hello Guest

LWJGL and MacOSX

  • 1 Replies
  • 346 Views
LWJGL and MacOSX
« on: 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
Code: [Select]
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
Code: [Select]
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?

*

Offline abcdef

  • ****
  • 336
Re: LWJGL and MacOSX
« Reply #1 on: July 01, 2023, 03:46:44 »
Try using this as a java option

-XstartOnFirstThread