From 1c957b26b48cb36cb4244902fd866f244f3119ba Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 29 Nov 2016 23:07:09 +0100 Subject: [PATCH] Fix for getting R8 and R8G8 formats via FrameBufferProperties --- panda/src/display/frameBufferProperties.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/panda/src/display/frameBufferProperties.cxx b/panda/src/display/frameBufferProperties.cxx index 51120fbec1..98b8341322 100644 --- a/panda/src/display/frameBufferProperties.cxx +++ b/panda/src/display/frameBufferProperties.cxx @@ -659,7 +659,7 @@ setup_color_texture(Texture *tex) const { // as the below one would be generated dynamically by the GSG to reflect the // formats that are supported for render-to-texture. - static const int num_formats = 15; + static const int num_formats = 17; static const struct { unsigned char color_bits, red_bits, green_bits, blue_bits, alpha_bits; bool has_float; @@ -669,6 +669,8 @@ setup_color_texture(Texture *tex) const { { 1, 1, 1, 0, 0, false, Texture::F_rg }, { 1, 1, 1, 1, 0, false, Texture::F_rgb }, { 1, 1, 1, 1, 1, false, Texture::F_rgba }, + { 8, 8, 0, 0, 0, false, Texture::F_red }, + { 16, 8, 8, 0, 0, false, Texture::F_rg }, { 24, 8, 8, 8, 0, false, Texture::F_rgb8 }, { 32, 8, 8, 8, 8, false, Texture::F_rgba8 }, { 16, 16, 0, 0, 0, true, Texture::F_r16 },