summaryrefslogtreecommitdiff
path: root/pyglet_snake.py
diff options
context:
space:
mode:
authorPeter Ward <peteraward@gmail.com>2009-09-30 11:24:13 +1000
committerPeter Ward <peteraward@gmail.com>2009-09-30 11:24:13 +1000
commit57fc09da7266a4dae3632d092007345d1b150848 (patch)
tree232368d508f171f40a775dd0396cc781f166084e /pyglet_snake.py
parent1e1ff7447285231cc06725fa51327ef7e63403d3 (diff)
Enabled alpha blending.
Diffstat (limited to 'pyglet_snake.py')
-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):