No OpenGL context found in the current thread, how do I fix this error?

This kind of error is common for LWJGL starters. The OpenGL context gets bound to a thread when it’s been created. So you can only access this context from the same thread.

As it does not look that you’re working with different threads there might be another cause. Slick2D seems to need a valid OpenGL context for its Image class.

So my first try would be to initialize an OpenGL context before initializing your card images.

Leave a Comment