for(unsigned i=0; i<6; ++i)
{
TextureCubeFace face = TextureCube::enumerate_faces(i);
faces[i].fbo.attach(COLOR_ATTACHMENT0, env_tex, face, 0);
faces[i].fbo.attach(DEPTH_ATTACHMENT, depth_buf);
for(unsigned i=0; i<6; ++i)
{
TextureCubeFace face = TextureCube::enumerate_faces(i);
faces[i].fbo.attach(COLOR_ATTACHMENT0, env_tex, face, 0);
faces[i].fbo.attach(DEPTH_ATTACHMENT, depth_buf);