From 7866408fa82b4f0b59e40f482b305d5b6bb05f5c Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Thu, 27 Jul 2017 11:29:06 -0500
Subject: [PATCH] Fix GL particle demo for PyOpenGL 3.1 (Fixes #196 on github)

---
 examples/gl_particle_animation.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/examples/gl_particle_animation.py b/examples/gl_particle_animation.py
index fc718081..6db8e2a3 100644
--- a/examples/gl_particle_animation.py
+++ b/examples/gl_particle_animation.py
@@ -143,8 +143,8 @@ cl_velocity = cl.Buffer(context, mf.COPY_HOST_PTR, hostbuf=np_velocity)
 cl_start_position = cl.Buffer(context, mf.READ_ONLY | mf.COPY_HOST_PTR, hostbuf=np_position)
 cl_start_velocity = cl.Buffer(context, mf.READ_ONLY | mf.COPY_HOST_PTR, hostbuf=np_velocity)
 
-cl_gl_position = cl.GLBuffer(context, mf.READ_WRITE, int(gl_position.buffers[0]))
-cl_gl_color = cl.GLBuffer(context, mf.READ_WRITE, int(gl_color.buffers[0]))
+cl_gl_position = cl.GLBuffer(context, mf.READ_WRITE, int(gl_position.buffer))
+cl_gl_color = cl.GLBuffer(context, mf.READ_WRITE, int(gl_color.buffer))
 
 kernel = """__kernel void particle_fountain(__global float4* position, 
                                             __global float4* color, 
@@ -178,4 +178,4 @@ kernel = """__kernel void particle_fountain(__global float4* position,
 }"""
 program = cl.Program(context, kernel).build()
 
-glutMainLoop()
\ No newline at end of file
+glutMainLoop()
-- 
GitLab