This topic is conceptually complex, but the implementation is extremely trivial. Make sure to write a good doc-string.
Starting in OpenGL 4.5, you can read pixels from the same texture that is currently being used as a framebuffer attachment, as long as the region you are reading from and the region you are writing to are different (accomplished with the use of viewport and scissor rectangles).
However, if you want to read from a previously-written section of a framebuffer, without unbnding the framebuffer, then you have to manually issue a memory barrier with glTextureBarrier().
This topic is conceptually complex, but the implementation is extremely trivial. Make sure to write a good doc-string.
Starting in OpenGL 4.5, you can read pixels from the same texture that is currently being used as a framebuffer attachment, as long as the region you are reading from and the region you are writing to are different (accomplished with the use of viewport and scissor rectangles).
However, if you want to read from a previously-written section of a framebuffer, without unbnding the framebuffer, then you have to manually issue a memory barrier with
glTextureBarrier()
.Refer to this section for more info: https://www.khronos.org/opengl/wiki/Memory_Model#Texture_barrier
glTextureBarrier()
will not need to be integrated with B+ in any special way apart from simply offering the function. It doesn't even have parameters.