Skip to content

Commit

Permalink
Refactor texture coordinate handling + more
Browse files Browse the repository at this point in the history
* Refactor texture coordinate handling into a new UVtexture class
* get_texture_id() now takes a Texture for simplicity
* Removed unnecessary methods and members
* Raise Exception instead of ValueError
* Update test
  • Loading branch information
einarf committed Feb 10, 2024
1 parent 91d8d12 commit 46cbf87
Show file tree
Hide file tree
Showing 6 changed files with 225 additions and 158 deletions.
2 changes: 1 addition & 1 deletion arcade/gui/nine_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def draw_sized(
:param pixelated: Whether to draw with nearest neighbor interpolation
"""
self.program.set_uniform_safe(
"texture_id", self._atlas.get_texture_id(self._texture.atlas_name)
"texture_id", self._atlas.get_texture_id(self._texture)
)
if pixelated:
self._atlas.texture.filter = self._ctx.NEAREST, self._ctx.NEAREST
Expand Down
Loading

0 comments on commit 46cbf87

Please sign in to comment.