Bypass parts of pipeline

Hello everyone,

I was wondering if its possible to obtain the contents of the framebuffer, then update it somehow and then get it back refreshed on the screen?
Well i could use an FBO, render to target(target could be a quad). But i just wanted to know if there is any way other than this approach.

I would not like the vertex processing again, thus avoiding some calculations.

Is that possible in any way?

You could, for example, use an FBO with texture attachments, draw to it then read the texture contents via glGetTexImage or glReadPixels, modify the content and then reupload the texture with glTexSubImage.

But unless you seriously need to do something you cannot do with the GPU (perhaps some strange filter), I see no reason to do this just to “not do the vertex processing again”.

Processing 4 vertices to draw a full screen quad is pretty much free in the grand scheme of things. You don’t even need to transform them as you can simply used clip space coordinates for them. If it still bothers you, you could use a single vertex and generate two triangles in the geometry shader. Heh.

There is the concept of Transform Feedback (DirectX call it render to vertex buffer) which allows you to sumbit some drawcalls, process them in some way (Vertex shader, Geometry shader) and save the results into a buffer object. That buffer object is then used in the second pass.
Just a thought.

Thanks for the answers :slight_smile: