summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpyglet_snake.py3
1 files changed, 3 insertions, 0 deletions
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):