def on_draw():
        window.clear()
        with nested(Projection(0, 0, window.width, window.height, far=1000.0), Matrix, Lighting):
            glTranslatef(0, 0, -40)

            with Matrix:
                glMultMatrixf(box.matrix)
                cube(size=(10,10,10), color=(0.5, 0.5, 0.5, 1.0))

        fps.draw()
        description.draw()
    def on_draw():
        window.clear()
        with nested(Projection(0, 0, window.width, window.height, far=1000.0),
                    Matrix, Lighting):
            glTranslatef(0, 0, -40)

            with Matrix:
                glMultMatrixf(box.matrix)
                cube(size=(10, 10, 10), color=(0.5, 0.5, 0.5, 1.0))

        fps.draw()
        description.draw()
    def on_draw():
        window.clear()
        with nested(Projection(0, 0, window.width, window.height, far=1000.0), Matrix, Lighting):
            glTranslatef(0, 0, -500)
            glRotatef(tilt*0.3, 1.0, 0, 0)
            glRotatef(rotate*0.3, 0.0, 1.0, 0)

            for body in bodies:
                with Matrix:
                    glMultMatrixf(body.matrix)
                    cube(size=body.size, color=(0.5, 0.5, 0.5, 1.0))

        fps.draw()
        description.draw()
Esempio n. 4
0
    def on_draw():
        window.clear()
        with nested(Projection(0, 0, window.width, window.height, far=1000.0),
                    Matrix, Lighting):
            glTranslatef(0, 0, -500)
            glRotatef(tilt * 0.3, 1.0, 0, 0)
            glRotatef(rotate * 0.3, 0.0, 1.0, 0)

            for body in bodies:
                with Matrix:
                    glMultMatrixf(body.matrix)
                    cube(size=body.size, color=(0.5, 0.5, 0.5, 1.0))

        fps.draw()
        description.draw()
Esempio n. 5
0
    def on_draw():
        window.clear()
        with nested(Projection(0, 0, window.width, window.height, far=1000.0), Matrix, Lighting):
            glTranslatef(0, 15, -60)
            glRotatef(tilt*0.3, 1.0, 0, 0)
            glRotatef(rotate*0.3, 0.0, 1.0, 0)

            for box in boxes:
                with Matrix:
                    glMultMatrixf(box.matrix)
                    cube(size=box_size, color=(0.2, 0.2, 0.2, 1.0))

            with Matrix:
                glMultMatrixf(ground.matrix)
                cube(size=ground_size, color=(0.2, 0.7, 0.2, 1.0))

        fps.draw()
        description.draw()