@@ -2,7 +2,7 @@
#include "images/PNGReader.h"
#include "memory/StackAllocator.h"
-FileTexture::FileTexture(const char* path) {
+FileTexture::FileTexture(const char* path, int maxMipMaps) : texture(maxMipMaps) {
PNGReader png(path);
if(png.hasError()) {
return;
@@ -7,7 +7,7 @@ class FileTexture final {
Texture texture;
public:
- FileTexture(const char* path);
+ FileTexture(const char* path, int maxMipMaps = 0);
void bindTo(int index) const;
};
@@ -6,7 +6,7 @@ Texture::Texture(const TextureFormat& format, int maxMipMaps) : format(format),
setRepeatWrap();
}
-Texture::Texture() : Texture(TextureFormat::unknown()) {
+Texture::Texture(int maxMipMaps) : Texture(TextureFormat::unknown(), maxMipMaps) {
Texture::~Texture() {
@@ -15,7 +15,7 @@ class Texture final {
Texture(const TextureFormat& format, int maxMipMaps = 0);
- Texture();
+ Texture(int maxMipMaps = 0);
~Texture();
Texture(const Texture& other) = delete;
Texture(Texture&& other) = delete;