2
$\begingroup$

At the moment, I render everything in my OpenGL application to a single framebuffer (color only, no depth buffer). I then go from the texture ID and read out some data to use it. My problem is, in the init, I first init the GLFW window, make it visible calling glfwShowWindow(window); and then create the frame buffer. This means I have an empty window showing up where nothing is rendered.

But when I comment this line to keep the window hidden, the frame buffer status after creation is GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT. How do I go about rendering offscreen without window, and is there a possibility to not use GLFW at all?

$\endgroup$

2 Answers 2

1
$\begingroup$

So the way I went by not showing the window seems the way to go, and the error about GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENTapparently wasn't related to this at all and is gone.

$\endgroup$
0
$\begingroup$

I do not know if reading directly from the frame buffer can work when you are not using the GLFW window at all. What you can do though, is create a texture which you can pass to your fragment or compute shaders and draw on it. But then methods like glDrawElements() (if i remember it correctly) will not work.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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