From: Mikko Rasa Date: Tue, 5 Dec 2017 11:49:34 +0000 (+0200) Subject: Call the non-multisample version of storage if samples is zero X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=ff46db8939d1763eab5bbb4dca711d635fdb5f23 Call the non-multisample version of storage if samples is zero OpenGL defines it like this. Do the check in application code so it works even if EXT_framebuffer_multisample is not supported. --- diff --git a/source/renderbuffer.cpp b/source/renderbuffer.cpp index 9d19e08b..f146a915 100644 --- a/source/renderbuffer.cpp +++ b/source/renderbuffer.cpp @@ -46,6 +46,9 @@ void Renderbuffer::storage(PixelFormat fmt, unsigned wd, unsigned ht) void Renderbuffer::storage_multisample(unsigned samples, PixelFormat fmt, unsigned wd, unsigned ht) { + if(!samples) + return storage(fmt, wd, ht); + static Require _req(EXT_framebuffer_multisample); fmt = normalize_format(fmt); require_pixelformat(fmt);