Coder Social home page Coder Social logo

rgl's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

rgl's Issues

Shader #version 330 core

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.