I am attempting to implement OpenGL based on some reference material. After adding all the necessary code,
I attempted to a run an unit test (the code of this can be found here: https://pastebin.com/B5sKmU20.)
However, I get an error at line 81 " int res = glContext.makeCurrent();", the full error is disclosed below.
Can someone help me resolve this, I couldn't find any other threads of people experiencing similar issues.
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
I'm new to JOGL, and I am also experiencing a similar issue.
I am trying to port an existing JOGL application that currently runs on windows + linux to mac, and when I call `makeCurrent()` I get the same error. The error goes away if I call `isFBO(true)` in the associated GLCapabilities, but when I do this `offscreen` is also set to true, resulting in no visible content being drawn.
The default GLCapabilities I receive from the following has isFBO, isPBuffer, and isBitmap all false by default, and onscreen true.
GLProfile glProfile = GLProfile.get(GLProfile.GL4);
GLCapabilities glCaps = new GLCapabilities(glProfile);
I am not sure why it is that this code works on windows + linux but not on mac. Any guidance would be appreciated, and I would be glad to provide any additional necessary information.
How would I check my Java3D version? I searched through the project and did not see the exact phrase "Java3D" anywhere.
From terminal, javac -version outputs "javac 10.0.1", so I believe that I am using JDK 10. Would switching to OpenJDK make a difference? I could also try updating to version 11, as it seems that support for JDK 10 has ended.
I added the setOnscreen(true) call as follows, and the crash still happens. I can confirm that this particular line does run, but I don't believe it has an impact as the debugger shows that within glCaps, onscreen is set to True before this line executes.
When I call setFBO followed by setOnscreen, the application crashes. The application also crashes, with the original error, if I call only setOnscreen.
if (OSType.getOSType() == OSType.MacOS)
To my knowledge I've never directly installed Java3D. I've installed JDKs from Oracle's site, but unless those came bundled with Java3D, or unless Java3D was installed automatically by some project, I don't believe I've installed it.
I spoke with the individual that wrote the JOGL code that I am trying to port, but he is not familiar with Java3D, and believes the only way we would be using it is if something we are relying on uses it internally.
If it matters, I was able to download and run the gears demo from the JOGL site.