I am generating an offscreen texture each frame using a shader, and would like to beable to keep the last n (~= 16) frames in texture memory, for use in another shader.
I currently trying to use a single graphics buffer for this, and binding a new texture each frame with RTMCopyTexture. I keep handles to the n textures, and want to cycle them.
The problem is that whenever I try to disassociate the previous texture from the buffer (using clearRenderTextures()), and associate a new one, the old one doesn’t seem to stay on the graphics card - at least according to base.win.getGsg().getPreparedTextures(). And I just get junk in them.
I’ve also tried just rendering to the same texture, and using makeCopy(), but this seems to copy the RAM image, which I don’t have, because I rendered it in graphics card memory. (Note I’m using the Panda 1.6.2 makeCopy fix)
I should beable to do this right? without having to make n graphics buffers.
Any thoughts?