Specifically the variable 'context' in Context context = CURRENT_CONTEXT.get(); in Class org.lwjglx.debug.opengl.GL on line 38 is null.
My code leading up to it:
public static void main(String[] args)
{
new Game().start();
}
private synchronized void start()
{
mainThread = new Thread(this, "main");
mainThread.start();
}
public void run()
{
window = new Window(W, H, title);
window.create();
<game loop here>
....
}
public class Window{
private long window;
private int width, height;
private String title;
private Input input;
public Window(int width, int height, String title)
{
this.width = width;
this.height = height;
this.title = title;
}
public void create()
{
iGLFW.glfwInit()
window = GLFW.glfwCreateWindow(width, height, title, 0, 0);
GLFWVidMode vidMode = GLFW.glfwGetVideoMode( GLFW.glfwGetPrimaryMonitor() );
GLFW.glfwSetWindowPos(window, ( (vidMode.width() - width) / 2 ), ( (vidMode.height() - height) / 2 ) );
GLFW.glfwMakeContextCurrent(window);
GL.createCapabilities(); //<--- HERE
GLFW.glfwSetKeyCallback(window, input.getKeyboardCallback());
GLFW.glfwSetCursorPosCallback(window, input.getMouseMoveCallback());
GLFW.glfwSetMouseButtonCallback(window, input.getMouseButtonsCallback());
GLFW.glfwShowWindow(window);
GLFW.glfwSwapInterval(1);
}