Hi, this may be me misunderstanding something about Java but I was looking at the Truetype example in the LWJGL samples and found this:
public static void main(String[] args) {
...
new Truetype(filePath).run("STB Truetype Demo");
}
Which then proceeds to spin up OpenGL and everything else to display the STB True Type demo.
However, isn't this on the main thread?!
Every other example of LWJGL I've seen emphasizes that all access to the GPU must be done on a new thread and so they implement Runnable and then start the graphics logic on a new Thread separate from main() or some variation.
So why is that not the case here?
Sorry if this is a dumb question, but if I can write my core logic without starting a new Thread from the main method... I mean that seems a little cleaner to me. But on the other hand, I feel like I might be missing something here.
Thanks for taking the time to answer this question.
edit: I just found this quote on the forums at random: "GLFW requires that most of its functions are called from the main thread. On macOS, that thread must also be the first thread in the process (that's why -XstartOnMainThread is needed). This is not a problem with LWJGL and not a problem with GLFW, it's how macOS works."
So have I been misreading something? But the fact remains that up until now every app I've seen with LWJGL has been implementing new Thread() before initializing anything...