Im not very expert OpenGl developper but my problem isn’t not trivial…and not for beginners too…
I’m developping a Multi-Planar Reconstruction for medical application and I’m a texture 3D that I cut with some quads for display different sections (Images 2D) translating plans…
Now, I would get back Images 2D diaplayed on the quads, in a buffer…but I don’t have Ideas what…
So basically you want to extract a 2D image layer from a 3D texture, is this correct? In such case, you can just draw a quad, textured with the appropiate texture layer and get the array of pixels using the ReadPixels function. I am not sure how this is an advanced question though…
What prevents you from rendering your 2D quad (with appropriate scale to match texture size) on screen, then copy to tex, then clear (no swap) then do the real classic rendering ?
I don’t really understand… Just render the part of the 3d texture on a fullscreen quad, either using FBO or without it (doesn’t matter anyway). Then read or copy it. Like this (without vbo):
glClear(...)
bind 3d texture
render a quad
readback
repeat as much you want
glClear(...)
render the scene
SwapBuffers()