Closed clankill3r closed 5 years ago
Mac OS requires the use of the -XstartOnFirstThread
JVM argument, so:
java -XstartOnFirstThread -jar target/lwjgl3-demos.jar
See: https://stackoverflow.com/questions/28149634/what-does-the-xstartonfirstthread-vm-argument-do-mean
Damn that was quick.
Ok I have a new error now:
Press 'up' or 'down' to cycle through some colors. ERROR: 0:5: '' : version '130' is not supported ERROR: 0:6: '' : #version required and missing.
java.lang.AssertionError: Could not compile shader at org.lwjgl.demo.opengl.UniformArrayDemo.createShader(UniformArrayDemo.java:203) at org.lwjgl.demo.opengl.UniformArrayDemo.createRasterProgram(UniformArrayDemo.java:215) at org.lwjgl.demo.opengl.UniformArrayDemo.init(UniformArrayDemo.java:144) at org.lwjgl.demo.opengl.UniformArrayDemo.run(UniformArrayDemo.java:273) at org.lwjgl.demo.opengl.UniformArrayDemo.main(UniformArrayDemo.java:290)
I found this issue: https://github.com/LWJGL/lwjgl3/issues/38
Where it tells to:
You have to explicitly request a 3.2 core context when creating the GLFW window.
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
But looking into the source files it already is like this.
Try changing the version in the uniformarray-vs.glsl
and uniformarray-fs.glsl
to #version 150
and please tell me, whether this works. This corresponds to the GLSL version for OpenGL 3.2.
Thank you so much, I got one demo running! What is the best way to check all the demos? Changing those 2 commands to check all demos will take me days:
./mvnw package -Dclass=opengl.UniformArrayDemo
java -cp target/lwjgl3-demos.jar org.lwjgl.demo.opengl.UniformArrayDemo
The best is obviously to use an IDE (IntelliJ IDEA, Eclipse, NetBeans, ...). All of those have excellent Maven integration and running a demo is as easy as using the "Run this Java file" command that every IDE provides.
Ok thanks, I think I will manage from here.
When I try the demos I get errors like:
This is either after executing:
or:
OSX 10.12.6