X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fframebuffer.cpp;h=d6fa973960fbe169f0aa31e482fbb2029b084166;hb=ada4b7614137221b64a00f31fde1498064e9fb19;hp=e9d8863ca16e4e0379a11e9777def136cb596d2e;hpb=3a1b9cbe2441ae670a97541dc8ccb0a2860c8302;p=libs%2Fgl.git diff --git a/source/core/framebuffer.cpp b/source/core/framebuffer.cpp index e9d8863c..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_t *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_t *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<