I've recently started to use the lwjgl and haven't run into any problems. Yesterday I went to create a new window (something I've done at least a dozen times, if not more) and it gave these errors when I ran it
Exception in thread "main" java.lang.RuntimeException: No OpenGL context found in the current thread.
at org.lwjgl.opengl.GLContext.getCapabilities(GLContext.java:124)
at org.lwjgl.opengl.GL11.glMatrixMode(GL11.java:2051)
at Main.initGL(Main.java:10)
at Main.main(Main.java:34)
My code is
import org.lwjgl.LWJGLException;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.DisplayMode;
import static org.lwjgl.opengl.GL11.*;
public class Main
{
public static void initGL()
{
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0, 640, 480, 0, 1, -1);
glMatrixMode(GL_MODELVIEW);
}
public static void initDisplay()
{
try
{
Display.setDisplayMode(new DisplayMode(480, 600));
Display.setTitle("Texture Demo");
Display.create();
}
catch (LWJGLException e)
{
e.printStackTrace();
}
Display.update();
}
public static void main(String[] args)
{
initGL();
initDisplay();
}
}
I can't see any errors and like I said, I've ran this code before.