diff --git a/examples/gl_particle_animation.py b/examples/gl_particle_animation.py index fc718081b117f494a76ec97ae1fab4b835cbbbac..6db8e2a3f6c000261e72f5bbc70234e55e7e6a64 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()