diff --git a/src/engine/loaders/bmp_loader.cpp b/src/engine/loaders/bmp_loader.cpp index 090fb47..ef42aad 100644 --- a/src/engine/loaders/bmp_loader.cpp +++ b/src/engine/loaders/bmp_loader.cpp @@ -50,8 +50,15 @@ void BmpLoader::load(Texture &o_texture, char *t_subfolder, char *t_name, char * u32 width = (u32)header[18]; u32 height = (u32)header[22]; + u32 bits = (u32)header[28]; + + if (bits != 24) + { + PRINT_ERR("Invalid bits per pixel in .bmp file - expected 24!"); + } + o_texture.setSize(width, height, TEX_TYPE_RGB); - printf("BMPLoader - width: %d | height: %d\n", width, height); + printf("BMPLoader - width: %d | height: %d | bits: %d\n", width, height, bits); u64 rowPadded = (width * 3 + 3) & (~3);