Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a way to check if a thread accessing a namespace function has a OpenGL context attached to it. I have looked around and all I can find is,

GLFWwindow* glfwGetCurrentContext();

Which will return NULL if there is no context, but is there a better way?

I'm using OpenGL 4.5 and GLFW 3.2

share|improve this question

As far as I know that's the best solution to check if there is an active context.

share|improve this answer
    
Thank's I was not too sure, It seems a little messy, but if it gets the job done, then that's all that matters :) – 0xen Jun 28 at 13:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.