How can I initialize a windowless OpenGL context with the minimal amount of code?
I’ve read here that you can use wglCreateContextAttribsARB to create windowless context, however it doesn’t explain how?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From the link:
That second sentence is important. From the WGL_ARB_create_context specification:
The specification doesn’t allow you to create a context without a window, since it needs the pixel format that you set into the device context. But you theoretically can pass NULL for the HDC when making the context current, which causes OpenGL to not have a default framebuffer.
But, as noted above, this may not actually work. You can try it to see what happens, but I wouldn’t get my hopes up.