fix clearing buffers: update framebuffer before clear
glFramebufferTexture changed to glFramebufferTexture2D