From 57fc09da7266a4dae3632d092007345d1b150848 Mon Sep 17 00:00:00 2001 From: Peter Ward Date: Wed, 30 Sep 2009 11:24:13 +1000 Subject: Enabled alpha blending. --- pyglet_snake.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyglet_snake.py b/pyglet_snake.py index aeaa157..e600c7f 100755 --- a/pyglet_snake.py +++ b/pyglet_snake.py @@ -32,6 +32,9 @@ class PygletSnakeEngine(SnakeEngine, pyglet.window.Window): def __init__(self, rows, columns, n_apples): super(PygletSnakeEngine, self).__init__(rows, columns, n_apples) + glEnable(GL_BLEND) + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) + pyglet.clock.schedule_interval(lambda t: self.update_snakes(), 0.025) def new_game(self, rows, columns, n_apples): -- cgit v1.2.3