Skip to content

Commit

Permalink
set default texture filter
Browse files Browse the repository at this point in the history
  • Loading branch information
szabolcsdombi committed Nov 16, 2022
1 parent 67a5eb6 commit 33e84a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions zengl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 33e84a6

Please sign in to comment.