Skip to content

Commit 2f363f5

Browse files
committed
Fix texture formats
1 parent 17921d2 commit 2f363f5

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

arcade/sprite_list/sprite_list.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,11 +1595,11 @@ def __init__(self, ctx: ArcadeContext, capacity: int, atlas: TextureAtlasBase) -
15951595
)
15961596

15971597
# Texture buffers for per-sprite data. These are looked up using gl_InstanceID
1598-
self._pos_angle_texture = self.ctx.texture(size=(capacity, 4), dtype="f4")
1599-
self._size_texture = self.ctx.texture(size=(capacity, 2), dtype="f4")
1600-
self._color_texture = self.ctx.texture(size=(capacity, 4), dtype="f4")
1601-
self._texture_id_texture = self.ctx.texture(size=(capacity, 1), dtype="i4")
1602-
self._index_texture = self.ctx.texture(size=(capacity, 1), dtype="i4")
1598+
self._pos_angle_texture = self.ctx.texture(size=(capacity, 1), components=4, dtype="f4")
1599+
self._size_texture = self.ctx.texture(size=(capacity, 1), components=2, dtype="f4")
1600+
self._color_texture = self.ctx.texture(size=(capacity, 1), components=4, dtype="f1")
1601+
self._texture_id_texture = self.ctx.texture(size=(capacity, 1), components=1, dtype="i4")
1602+
self._index_texture = self.ctx.texture(size=(capacity, 1), components=1, dtype="i4")
16031603

16041604
def write_sprite_buffers_to_gpu(
16051605
self,
@@ -1657,9 +1657,9 @@ def grow_sprite_buffers(self) -> None:
16571657
self._buf_capacity = self._buf_capacity * 2
16581658

16591659
# Extend the textures so we don't lose the old data
1660-
self._pos_angle_texture.resize((self._buf_capacity, 4))
1661-
self._size_texture.resize((self._buf_capacity, 2))
1662-
self._color_texture.resize((self._buf_capacity, 4))
1660+
self._pos_angle_texture.resize((self._buf_capacity, 1))
1661+
self._size_texture.resize((self._buf_capacity, 1))
1662+
self._color_texture.resize((self._buf_capacity, 1))
16631663
self._texture_id_texture.resize((self._buf_capacity, 1))
16641664

16651665
def grow_index_buffer(self) -> None:

0 commit comments

Comments
 (0)