mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
fix old bam loading
This commit is contained in:
parent
2fb953bcb5
commit
00a012ef13
@ -7202,6 +7202,14 @@ make_this_from_bam(const FactoryParams ¶ms) {
|
|||||||
int alpha_file_channel = scan.get_uint8();
|
int alpha_file_channel = scan.get_uint8();
|
||||||
bool has_rawdata = scan.get_bool();
|
bool has_rawdata = scan.get_bool();
|
||||||
TextureType texture_type = (TextureType)scan.get_uint8();
|
TextureType texture_type = (TextureType)scan.get_uint8();
|
||||||
|
if (manager->get_file_minor_ver() < 25) {
|
||||||
|
// Between Panda3D releases 1.7.2 and 1.8.0 (bam versions 6.24 and
|
||||||
|
// 6.25), we added TT_2d_texture_array, shifting the definition
|
||||||
|
// for TT_cube_map.
|
||||||
|
if (texture_type == TT_2d_texture_array) {
|
||||||
|
texture_type = TT_cube_map;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Texture *me = NULL;
|
Texture *me = NULL;
|
||||||
if (has_rawdata) {
|
if (has_rawdata) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user