glDeleteRenderbuffers(1, &id);
}
+PixelFormat Renderbuffer::normalize_format(PixelFormat fmt)
+{
+ if(!get_component_size(fmt) && OES_required_internalformat)
+ return get_default_sized_pixelformat(fmt);
+
+ return fmt;
+}
+
void Renderbuffer::storage(PixelFormat fmt, unsigned wd, unsigned ht)
{
+ fmt = normalize_format(fmt);
require_pixelformat(fmt);
width = wd;
height = 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);
width = wd;