Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shader #version 330 core #1

Open
jearmstrong21 opened this issue Jun 15, 2018 · 0 comments
Open

Shader #version 330 core #1

jearmstrong21 opened this issue Jun 15, 2018 · 0 comments

Comments

@jearmstrong21
Copy link

Stacktrace:

Exception in thread "main" java.lang.IllegalStateException: Failed to compile vertex shader:
ERROR: 0:1: '' :  version '330' is not supported
ERROR: 0:1: '' : syntax error: #version
ERROR: 0:3: 'layout' : syntax error: syntax error

	at net.rabbit.rgl.core.opengl.Shader.<init>(Shader.java:34)
	at test.Test.main(Test.java:41)

Eclipse specs:

Eclipse IDE for Java Developers
Version: Photon Milestone 5 (4.8.0M5)
Build id: 20180202-1214

Mac specs:

MacBook Pro (15-inch, 2017)
Processor: 2.9 GHz Intel Core i7
Graphics: Radeon Pro 560 4096 MB
	  Intel HD Graphics 630 1536 MB

Using .jar files provided by the /lib/ folder:
Attached .jar files:

lib/lwjgl-glfw-natives-macos.jar
lib/lwjgl-glfw.jar
lib/lwjgl-natives-macos.jar
lib/lwjgl-opengl-natives-macos.jar
lib/lwjgl.jar

Using the net.rabbit.rgl.core.* packages as source files.
Using the test.Test test file with the exact same resource structure as in the repository.

Looking in the net.rabbit.rgl.core.context.Display class, for window initialization I see:

handle = glfwCreateWindow(width, height, title, NULL, NULL);

There are no glfwWindowHint calls.
In GLFW/XCode/C++/OpenGL/Mac, I need at least 4-5 glfwWindowHint calls to get GLFW working.

Here are the C++ calls that I believe should be put in:

glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
#ifdef __APPLE__
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
#endif

Hopefully this can be fixed.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant