Explorar el Código

Fix for getting R8 and R8G8 formats via FrameBufferProperties

rdb hace 9 años
padre
commit
1c957b26b4
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      panda/src/display/frameBufferProperties.cxx

+ 3 - 1
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 },