No OpenGL context is current in the current thread

后端 未结 2 1970
粉色の甜心
粉色の甜心 2020-12-21 10:24

I\'m following a tutorial on youtube but I have a problem with OpenGL that I\'m not able to solve. I have no idea how I can fix it.

Exception in thread \"En         


        
相关标签:
2条回答
  • 2020-12-21 10:28

    OpenGL contexts are bound to a thread when they are created, so they can only be used from that thread. See the answer here.

    0 讨论(0)
  • 2020-12-21 10:45

    You need to call glfwMakeContextCurrent to bind the OpenGL context to your thread. There's a working example on the LWJGL website as well.

    0 讨论(0)
提交回复
热议问题