X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Feffects%2Fenvironmentmap.cpp;h=0cd1d4b99e3821f0c28b0b06c72328c93a28cbac;hb=0d5406c66549a2cfc2fca701cc1c4972e7fd493a;hp=87e4898df21a48d07f9cf7346f3926d9b5523d87;hpb=b7ecc29c204faede028556d1942b2d61d5cda9ee;p=libs%2Fgl.git diff --git a/source/effects/environmentmap.cpp b/source/effects/environmentmap.cpp index 87e4898d..0cd1d4b9 100644 --- a/source/effects/environmentmap.cpp +++ b/source/effects/environmentmap.cpp @@ -48,7 +48,7 @@ void EnvironmentMap::init(unsigned s, PixelFormat f, unsigned l) depth_buf.storage(DEPTH_COMPONENT32F, size, size, 1); for(unsigned i=0; i<6; ++i) { - TextureCubeFace face = TextureCube::enumerate_faces(i); + TextureCubeFace face = static_cast(i); faces[i].fbo.set_format((COLOR_ATTACHMENT,f, DEPTH_ATTACHMENT,DEPTH_COMPONENT32F)); faces[i].fbo.attach(COLOR_ATTACHMENT, env_tex, face, 0); faces[i].fbo.attach(DEPTH_ATTACHMENT, depth_buf); @@ -75,7 +75,7 @@ void EnvironmentMap::init(unsigned s, PixelFormat f, unsigned l) LinAl::Matrix face_matrices[6]; for(unsigned i=0; i<6; ++i) { - GL::TextureCubeFace face = GL::TextureCube::enumerate_faces(i); + GL::TextureCubeFace face = static_cast(i); GL::Vector3 columns[3]; columns[0] = GL::TextureCube::get_s_direction(face); columns[1] = GL::TextureCube::get_t_direction(face); @@ -139,7 +139,6 @@ void EnvironmentMap::setup_frame(Renderer &renderer) { faces[i].camera.set_position(center); renderer.set_framebuffer(&faces[i].fbo); - renderer.clear(); renderer.set_camera(faces[i].camera); renderer.render(environment); }