diff --git a/common/texture.cpp b/common/texture.cpp index 0be7df4ac..371bcac91 100644 --- a/common/texture.cpp +++ b/common/texture.cpp @@ -51,6 +51,8 @@ GLuint loadBMP_custom(const char * imagepath){ if (imageSize==0) imageSize=width*height*3; // 3 : one byte for each Red, Green and Blue component if (dataPos==0) dataPos=54; // The BMP header is done that way + fseek(file, dataPos, SEEK_SET); + // Create a buffer data = new unsigned char [imageSize]; @@ -211,4 +213,4 @@ GLuint loadDDS(const char * imagepath){ return textureID; -} \ No newline at end of file +}