INNER CODE UNIT · Python

TexturedQuadExample

mosra/magnum-examples · src/python/magnum-texturedquad.py:100

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', [
            0, 1, 2,
            2, 1, 3
        ]))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…