support attaching cubemap textures to FBO
fix bugs for the last commit