diff options
| author | Mel <einebeere@gmail.com> | 2022-10-26 17:15:45 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2022-10-26 17:15:45 +0200 |
| commit | 40b2da87db59162baaa41710d2cc95101f1466f1 (patch) | |
| tree | f99ae0fdaf087f252c305600e2f76d3a6bd676aa /src | |
| parent | e66f7011fb23e3509ad95accec581f6269813266 (diff) | |
| download | meowcraft-40b2da87db59162baaa41710d2cc95101f1466f1.tar.zst meowcraft-40b2da87db59162baaa41710d2cc95101f1466f1.zip | |
Turn off viewer and mipmaps
Diffstat (limited to 'src')
| -rw-r--r-- | src/GFX/Texture.cpp | 2 | ||||
| -rw-r--r-- | src/main.cpp | 10 |
2 files changed, 1 insertions, 11 deletions
diff --git a/src/GFX/Texture.cpp b/src/GFX/Texture.cpp index 1942128..f5474df 100644 --- a/src/GFX/Texture.cpp +++ b/src/GFX/Texture.cpp @@ -10,7 +10,7 @@ Texture::Texture(const Image::RawImage& image) { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, image.width(), image.height(), 0, GL_RGB, GL_UNSIGNED_BYTE, image.raw()); diff --git a/src/main.cpp b/src/main.cpp index 2589555..dcac677 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -50,14 +50,6 @@ void run() { glViewport(0, 0, w, h); }); - auto example_image = MC::GFX::Image::RawImage(10, 10, 3); - for (uint8_t x = 0; x < 10; x++) { - for (uint8_t y = 0; y < 10; y++) { - example_image.add({static_cast<uint8_t>(x * 20), 0, static_cast<uint8_t>(y * 20)}); - } - } - auto viewer = MC::Util::ImageViewer(example_image); - auto image = MC::GFX::Image::PPMParser(MC::Assets::Images::atlas).parse(); auto texture = MC::GFX::Texture(image); @@ -114,8 +106,6 @@ void run() { render(chunk.mesh.value(), texture); } - viewer.render(); - time++; } } |
