added 2d png support

This commit is contained in:
h4570
2020-12-01 17:26:10 +01:00
parent 3841487388
commit 510199164c
17 changed files with 317 additions and 80 deletions
+1 -3
View File
@@ -50,10 +50,8 @@ void BmpLoader::load(MeshTexture &o_texture, char *t_subfolder, char *t_name, ch
u32 width = (u32)header[18];
u32 height = (u32)header[22];
o_texture.setSize(width, height);
o_texture.setSize(width, height, TEX_TYPE_RGB);
printf("BMPLoader - width: %d | height: %d\n", width, height);
if (width > 128 || height > 128)
PRINT_ERR("Given texture is big for PS2. Please strict to 128x128 max");
u64 rowPadded = (width * 3 + 3) & (~3);