diff --git a/CHANGELOG.md b/CHANGELOG.md index 718c1c5f..9d0e6e66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). # [main](https://github.com/szabolcsdombi/zengl/compare/1.10.0...main) +- Implemented default texture filter for improved external texture support + # [1.10.0](https://github.com/szabolcsdombi/zengl/compare/1.9.3...1.10.0) - Implemented external buffers and textures diff --git a/zengl.cpp b/zengl.cpp index 17f9e026..8eb68ead 100644 --- a/zengl.cpp +++ b/zengl.cpp @@ -1005,6 +1005,8 @@ Image * Context_meth_image(Context * self, PyObject * vargs, PyObject * kwargs) gl.GenTextures(1, (unsigned *)&image); gl.ActiveTexture(self->default_texture_unit); gl.BindTexture(target, image); + gl.TexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + gl.TexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); if (cubemap) { int padded_row = (width * format.pixel_size + 3) & ~3; int stride = padded_row * height;