INNER CODE UNIT · Python
bind_texture
mosra/magnum-examples · src/python/magnum-texturedquad.py:97
def bind_texture(self, texture: gl.Texture2D):
texture.bind(self._texture_unit)
class TexturedQuadExample(Application):
def __init__(self):
Application.__init__(self, self.Configuration(
title="Magnum Python Textured Quad Example"
))
vertices = gl.Buffer()
vertices.set_data(array.array('f', [
0.5, -0.5, 1.0, 0.0,
0.5, 0.5, 1.0, 1.0,
-0.5, -0.5, 0.0, 0.0,
-0.5, 0.5, 0.0, 1.0
]))
indices = gl.Buffer()
indices.set_data(array.array('I', [