I am following this tutorial about framebuffers in OpenGL. I have implemented a FPS camera before and now I implemented the framebuffer.
Now as long as I don’t use any controls (WASD and mouse) it works perfectly. But as soon as I move the camera around, a weird error happens.
It’s as if the contents of the framebuffer texture from the last frame aren’t erased, but just the current frame’s contents are added.
I am using the object class from my previous question and a camera class and I’m also loading shaders with a function from another file, but it has nothing to do with this.
Code
main.cpp
object.h
camera.h
Shaders (for the framebuffer texture quad)
What am I missing?