<p>So the way I went by not showing the window seems the way to go, and the error about <code>GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT</code>apparently wasn't related to this at all and is gone.</p>

CC BY-SA 3.0
2017-06-16T18:01:59.833Z
2017-06-16T18:01:59.833Z
piegames
<p>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.</p>

CC BY-SA 4.0
2020-07-27T14:47:59.770Z
2020-07-27T14:47:59.770Z
Boris Vassilev
<p>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 <code>glfwShowWindow(window);</code> and then create the frame buffer. This means I have an empty window showing up where nothing is rendered. </p>

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

<opengl><frame-buffer>
LWJGL 3 render to texture offscreen without display
piegames
# LWJGL 3 render to texture offscreen without display

(Asked by: username_0 on 2017-06-15)

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?

**Tags:** opengl, frame-buffer


---

## 2 answers

### Answer by username_0 on 2017-06-16. Score: 1 | Accepted answer

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


---

### Answer by username_1 on 2020-07-27. Score: 0

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.


---

