Render old scene behind an object using a texture

I’m working with OpenGL and I want to have this object that, at some point, captures the scene behind it in a texture of some sort, and then renders that texture so it appears to be the captured “frame” of the scene.

My first idea was to capture a cubemap of the scene, and render the cubemap to a frame buffer using the world camera and use that texture, but I was unable to do it properly and kind of discarded the idea. Was I on the right track? How would I do something like this?

I think the solution is a lot more simple. Use a framebuffer and render the scene from the perspective of behind the object (essentially placing a camera behind the object). then use the texture from the framebuffer. then simply draw a quad of that texture to fill the screen. (alternatively you could blit it to the default framebuffer) Framebuffer Object - OpenGL Wiki