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