def on_draw(self): set3D(self.window) self.window.clear() glLoadIdentity() self.camera.focus() batch.get_batch().draw() set2D(self.window) return pyglet.event.EVENT_HANDLED
def build_scene(self): self.quad = batch.get_batch().add(4, GL_QUADS, GRP_BLEND_ONE_MINUS, ("v3f", fade_quad), ("c4f", fade_color * 4)) self.camera = Camera((3.8, -18.0, 1.0), (3.8, 0, 1.0)) self.attaboy = MsgQueue()
def __init__(self, window, name="default", *args, **kwargs): window.push_handlers(self) self.window = window self.name = name self.batch = batch.get_batch(self.name)