X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fcommands.cpp;fp=source%2Fcore%2Fcommands.cpp;h=19ff10115e53e10faf612220c2daf3f4697f841e;hb=1fba50491957cdd28cff4082a32764691d8ec473;hp=f2c273727c7d2b5fcd7037b77f8df51c1b1f7a1e;hpb=0d5406c66549a2cfc2fca701cc1c4972e7fd493a;p=libs%2Fgl.git diff --git a/source/core/commands.cpp b/source/core/commands.cpp index f2c27372..19ff1011 100644 --- a/source/core/commands.cpp +++ b/source/core/commands.cpp @@ -82,7 +82,7 @@ void Commands::draw_instanced(const Batch &batch, unsigned count) glDrawElementsInstanced(batch.get_gl_primitive_type(), batch.size(), batch.get_gl_index_type(), data_ptr, count); } -void Commands::resolve_multisample(Framebuffer &target, BufferBits buffers) +void Commands::resolve_multisample(Framebuffer &target) { static Require _req(EXT_framebuffer_blit); @@ -90,6 +90,7 @@ void Commands::resolve_multisample(Framebuffer &target, BufferBits buffers) unsigned width = min(source->get_width(), target.get_width()); unsigned height = min(source->get_height(), target.get_height()); + unsigned buffers = get_gl_buffer_bits(source->get_format())&get_gl_buffer_bits(target.get_format()); if(ARB_direct_state_access) glBlitNamedFramebuffer(source->id, target.id, 0, 0, width, height, 0, 0, width, height, buffers, GL_NEAREST);