From ff46db8939d1763eab5bbb4dca711d635fdb5f23 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 5 Dec 2017 13:49:34 +0200 Subject: [PATCH] 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. --- source/renderbuffer.cpp | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.43.0