Fix incorrect format selection for renderbuffers (missing alpha channel)

This commit is contained in:
rdb 2016-04-12 20:44:07 +02:00
parent 873fd3294a
commit 82fdb30957

View File

@ -789,7 +789,7 @@ bind_slot(int layer, bool rb_resize, Texture **attach, RenderTexturePlane slot,
}
} else {
if (_fb_properties.get_color_bits() > 16 * 3) {
gl_format = GL_RGBA32F_ARB;
gl_format = GL_RGB32F_ARB;
} else if (_fb_properties.get_color_bits() > 8 * 3) {
gl_format = GL_RGB16_EXT;
} else {
@ -807,11 +807,11 @@ bind_slot(int layer, bool rb_resize, Texture **attach, RenderTexturePlane slot,
}
} else {
if (_fb_properties.get_color_bits() > 16 * 3) {
gl_format = GL_RGB32F_ARB;
gl_format = GL_RGBA32F_ARB;
} else if (_fb_properties.get_color_bits() > 8 * 3) {
gl_format = GL_RGB16_EXT;
gl_format = GL_RGBA16_EXT;
} else {
gl_format = GL_RGB;
gl_format = GL_RGBA;
}
}
}