Answer the question
In order to leave comments, you need to log in
Why is the No context is current or a function that is not available in the current context was called error thrown?
I am using JWJGL and I get an error:
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.GL11.glMatrixMode(Native Method)
at ru.REStudios.core.engine.Window.init(Window.java:100)
at ru.REStudios.core.engine.GameEngine.init(GameEngine.java:39)
at ru.REStudios.core.engine.GameEngine.run(GameEngine.java:31)
at ru.REStudios.core.game.Main.main(Main.java:19)
GL.createCapabilities()
glfwMakeContextCurrent(long)
glfwMakeContextCurrent(windowHandle);
GL.createCapabilities();
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
glViewport(0, 0, width, height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0.0f, 0.0f, -50.0f);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question