From 82fdb3095759d3dd09b5ee246da2c0b967f521bc Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 12 Apr 2016 20:44:07 +0200 Subject: [PATCH] Fix incorrect format selection for renderbuffers (missing alpha channel) --- panda/src/glstuff/glGraphicsBuffer_src.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/panda/src/glstuff/glGraphicsBuffer_src.cxx b/panda/src/glstuff/glGraphicsBuffer_src.cxx index 290dadfcf5..93a5c24180 100644 --- a/panda/src/glstuff/glGraphicsBuffer_src.cxx +++ b/panda/src/glstuff/glGraphicsBuffer_src.cxx @@ -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; } } }