#!/usr/bin/env python3

"""A green rectangle should take up most of the screen."""

import pyglet
import glooey
import vecrec

print(__doc__)

window = pyglet.window.Window()
batch = pyglet.graphics.Batch()

rect = vecrec.Rect.from_pyglet_window(window)
rect.shrink(50)

glooey.drawing.Rectangle(rect, batch=batch)

@window.event
def on_draw():
    window.clear()
    batch.draw()


pyglet.app.run()

#!/usr/bin/env python3

"""Two green rectangles should take up most of the screen."""

import pyglet
import glooey
import vecrec

print(__doc__)

window = pyglet.window.Window()
batch = pyglet.graphics.Batch()

full = vecrec.Rect.from_pyglet_window(window)
left = vecrec.Rect(full.left, full.bottom, full.width/2, full.height)
right = vecrec.Rect(full.left, full.bottom, full.width/2, full.height)
right.left = left.right
left.shrink(50)
right.shrink(50)

glooey.drawing.Rectangle(left, batch=batch)
glooey.drawing.Rectangle(right, batch=batch)

@window.event
def on_draw():
    window.clear()
    batch.draw()


pyglet.app.run()

Make sure GL_QUADS don't end up weirdly connected.
Make sure GL_QUADS don't end up weirdly connected.
