From 276ff18fc8f8bfdb61eb8629e71d5e266cf3a088 Mon Sep 17 00:00:00 2001 From: Dexer <73297572+DexerBR@users.noreply.github.com> Date: Wed, 1 Nov 2023 14:29:12 -0300 Subject: [PATCH] Avoid multiple values for `noadd` in `VertexInstruction` (#8374) * avoid multiple values for 'noadd' * Update kivy/graphics/instructions.pyx Co-authored-by: Mirko Galimberti --------- Co-authored-by: Mirko Galimberti --- kivy/graphics/instructions.pyx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kivy/graphics/instructions.pyx b/kivy/graphics/instructions.pyx index c1f1ab20c..db170144e 100644 --- a/kivy/graphics/instructions.pyx +++ b/kivy/graphics/instructions.pyx @@ -289,6 +289,9 @@ cdef class VertexInstruction(Instruction): Triangles, Lines, Ellipse and so on. ''' def __init__(self, **kwargs): + # avoid multiple values for 'noadd' in BindTexture below + noadd_value = kwargs.pop('noadd', False) + # Set a BindTexture instruction to bind the texture used for # this instruction before the actual vertex instruction self.texture_binding = BindTexture(noadd=True, **kwargs) @@ -297,7 +300,7 @@ cdef class VertexInstruction(Instruction): if tex_coords: self.tex_coords = tex_coords - Instruction.__init__(self, **kwargs) + Instruction.__init__(self, noadd=noadd_value, **kwargs) self.flags = GI_VERTEX_DATA & GI_NEEDS_UPDATE self.batch = VertexBatch()