|
@@ -2,7 +2,7 @@
|
|
|
#include "images/PNGReader.h"
|
|
|
#include "utils/List.h"
|
|
|
|
|
|
-FileTexture::FileTexture(const char* path, int maxMipMaps)
|
|
|
+FileTexture::FileTexture(const char* path, int maxMipMaps, bool linear)
|
|
|
: texture(maxMipMaps) {
|
|
|
PNGReader png(path);
|
|
|
if(png.hasError()) {
|
|
@@ -11,7 +11,7 @@ FileTexture::FileTexture(const char* path, int maxMipMaps)
|
|
|
List<ColorChannel> buffer;
|
|
|
buffer.resize(png.getBufferSize());
|
|
|
if(!png.readData(buffer.begin())) {
|
|
|
- texture.setFormat(TextureFormat::color8(png.getChannels()));
|
|
|
+ texture.setFormat(TextureFormat::color8(png.getChannels(), linear));
|
|
|
texture.setData(png.getWidth(), png.getHeight(), buffer.begin());
|
|
|
}
|
|
|
}
|