Raylib-J icon indicating copy to clipboard operation
Raylib-J copied to clipboard

No context is current or a function that is not available in the current context was called. The JVM will abort execution.

Open ghost opened this issue 3 years ago • 4 comments

Describe the bug

$ ./gradlew run

> Task :run FAILED
INFO: Initializing raylib 4.0
WARNING: GLFW: Error: 65543 Description: 36103808
WARNING: GLFW: Failed to initialize Window
INFO: TIMER: Target time per frame: 16.666666666666668 milliseconds
FATAL ERROR in native method: Thread[main,5,main]: No context is current or a function that is not available in the current context was called. The JVM will abort execution.
        at org.lwjgl.opengl.GL20C.glDisableVertexAttribArray(Native Method)
        at org.lwjgl.opengl.GL20.glDisableVertexAttribArray(GL20.java:1948)
        at com.raylib.java.rlgl.RLGL.UnloadRenderBatch(RLGL.java:1527)
        at com.raylib.java.rlgl.RLGL.rlglClose(RLGL.java:1037)
        at com.raylib.java.core.rCore.CloseWindow(rCore.java:202)
        at com.raylib.java.core.rCore.WindowShouldClose(rCore.java:233)
        at com.raylib.java.Main.main(Main.java:33)

FAILURE: Build failed with an exception.

To Reproduce Steps to reproduce the behavior:

  1. git clone https://github.com/AKDev21/temporary-repository.git
  2. cd temporary-repository
  3. gradlew run
  4. See error

Expected behavior core-window example

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
  • Version: 7 64 bit

ghost avatar Dec 15 '21 11:12 ghost

I have no clue why but i did the step you told to do to reproduce the error but for me it work

mateoox600 avatar Dec 15 '21 23:12 mateoox600

What verson of OpenGL are you running? From what I can tell this appears to be an version specific issue.

CreedVI avatar Dec 26 '21 15:12 CreedVI

OpengL Version: 3.1.0 - Build 9.17.10.4229

ghost avatar Dec 26 '21 16:12 ghost

I believe the issue is that in OpenGL 3.0 glbegin() is depreciated and errors when called. Can you try manually setting your OpenGL version to 3.3 at line 953 in RLGL.java and try to run the example?

CreedVI avatar Dec 27 '21 00:12 CreedVI