mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 15:53:55 -04:00
parent
bcb61fec09
commit
ab4367ee7b
@ -964,8 +964,26 @@ bind_slot(int layer, bool rb_resize, Texture **attach, RenderTexturePlane slot,
|
||||
} else {
|
||||
gl_format = GL_R16F;
|
||||
}
|
||||
} else if (_fb_properties.get_color_bits() > 8 * 3) {
|
||||
gl_format = GL_RGB16_EXT;
|
||||
} else if (_fb_properties.get_color_bits() > 10 * 3 ||
|
||||
_fb_properties.get_red_bits() > 10 ||
|
||||
_fb_properties.get_green_bits() > 10 ||
|
||||
_fb_properties.get_blue_bits() > 10) {
|
||||
// 16-bit normalized.
|
||||
if (_fb_properties.get_blue_bits() > 0 ||
|
||||
_fb_properties.get_color_bits() == 1 ||
|
||||
_fb_properties.get_color_bits() > 16 * 2) {
|
||||
gl_format = GL_RGBA16;
|
||||
} else if (_fb_properties.get_green_bits() > 0 ||
|
||||
_fb_properties.get_color_bits() > 16) {
|
||||
gl_format = GL_RG16;
|
||||
} else {
|
||||
gl_format = GL_R16;
|
||||
}
|
||||
} else if (_fb_properties.get_color_bits() > 8 * 3 ||
|
||||
_fb_properties.get_red_bits() > 8 ||
|
||||
_fb_properties.get_green_bits() > 8 ||
|
||||
_fb_properties.get_blue_bits() > 8) {
|
||||
gl_format = GL_RGB10_A2;
|
||||
} else {
|
||||
gl_format = GL_RGB;
|
||||
}
|
||||
@ -982,7 +1000,7 @@ bind_slot(int layer, bool rb_resize, Texture **attach, RenderTexturePlane slot,
|
||||
if (_fb_properties.get_color_bits() > 16 * 3) {
|
||||
gl_format = GL_RGBA32F_ARB;
|
||||
} else if (_fb_properties.get_color_bits() > 8 * 3) {
|
||||
gl_format = GL_RGBA16_EXT;
|
||||
gl_format = GL_RGBA16;
|
||||
} else {
|
||||
gl_format = GL_RGBA;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user