Fix textures not being rendered in a render call that also uploads textures

The active texture should not be unbound in the upload texture functions
This commit is contained in:
Kovid Goyal 2017-08-22 18:34:25 +05:30
parent 1fcb865202
commit 3d15a1d786
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -169,7 +169,6 @@ class Sprites: # {{{
glPixelStorei(GL_UNPACK_ALIGNMENT, 1)
x, y = x * self.cell_width, y * self.cell_height
glTexSubImage3D(tgt, 0, x, y, z, self.cell_width, self.cell_height, 1, GL_RED, GL_UNSIGNED_BYTE, addressof(buf))
glBindTexture(tgt, 0)
def realloc_texture(self):
tgt = GL_TEXTURE_2D_ARRAY
@ -204,7 +203,6 @@ class Sprites: # {{{
self.last_num_of_layers = znum
self.last_ynum = self.backend.ynum
self.texture_id = tex
glBindTexture(tgt, 0)
def destroy(self):
if self.texture_id is not None: