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

后端 未结 5 662
不思量自难忘°
不思量自难忘° 2020-12-02 01:49

I\'m working on a card game, and currently have a good foundation but I\'m running into an error when I run it in eclipse. I\'m also using slick 2d.

Here is the erro

5条回答
  •  情话喂你
    2020-12-02 02:27

    This happened to me once, and I couldn't figure out what to do until I realized I was calling the image loader before OpenGL had initialized. Make sure that you aren't defining any variables with an image loader in the constructor(or any other method called) before OpenGL inits(what I did).

    Are you defining a Card class before OpenGL is initialized?

    Hope this helps.

提交回复
热议问题