X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fframebuffer.cpp;h=d6fa973960fbe169f0aa31e482fbb2029b084166;hb=ada4b7614137221b64a00f31fde1498064e9fb19;hp=0ce00becd23d5503ca5f26fec5f13eab065f9f17;hpb=e9a898f315b5d1396f196d785913a283c30940f2;p=libs%2Fgl.git diff --git a/source/core/framebuffer.cpp b/source/core/framebuffer.cpp index 0ce00bec..d6fa9739 100644 --- a/source/core/framebuffer.cpp +++ b/source/core/framebuffer.cpp @@ -131,9 +131,9 @@ void Framebuffer::update() const vector color_bufs; color_bufs.reserve(format.size()); unsigned i = 0; - for(const UInt16 *j=format.begin(); j!=format.end(); ++j, ++i) + for(FrameAttachment a: format) { - GLenum gl_attach_point = get_gl_attachment(static_cast(*j)); + GLenum gl_attach_point = get_gl_attachment(a); if(dirty&(1<1) @@ -254,21 +256,23 @@ void Framebuffer::set_attachment(FrameAttachment attch, Texture &tex, unsigned l throw incompatible_data("Framebuffer::attach"); unsigned i = 0; - for(const UInt16 *j=format.begin(); j!=format.end(); ++j, ++i) - if(*j==attch) + for(FrameAttachment a: format) + { + if(a==attch) { attachments[i].set(tex, level, layer); dirty |= 1<