2024-08-23 21:47:37 -04:00
|
|
|
#include "load_texture.h"
|
|
|
|
|
|
|
|
#include <iostream>
|
2024-08-23 21:56:12 -04:00
|
|
|
#include <FreeImage.h>
|
2024-08-23 21:47:37 -04:00
|
|
|
|
|
|
|
namespace Texture {
|
|
|
|
void LoadTexture(const char* filePath) {
|
|
|
|
FIBITMAP* bitmap = FreeImage_Load(FIF_TIFF, filePath, TIFF_DEFAULT);
|
|
|
|
|
|
|
|
if(!bitmap) {
|
|
|
|
std::cerr << "Failed to load TIFF image: " << filePath << std::endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
FIBITMAP* bitmap32 = FreeImage_ConvertTo32Bits(bitmap);
|
|
|
|
FreeImage_Unload(bitmap);
|
|
|
|
}
|
|
|
|
}
|