From dc6e54725daba6718d5f628a8af23ed2f5c68926 Mon Sep 17 00:00:00 2001 From: Mamat Rahmat Date: Tue, 20 Nov 2018 12:14:07 +0700 Subject: [PATCH] Make particle example work without PyOpenGL_accelerate vbo.buffer nor vbo.buffers aren't normally used by external code The normal way to get the ID of the VBO is int(vbo) See https://github.com/inducer/pyopencl/issues/196 --- examples/gl_particle_animation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/gl_particle_animation.py b/examples/gl_particle_animation.py index 6db8e2a3..dd2f05c2 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.buffer)) -cl_gl_color = cl.GLBuffer(context, mf.READ_WRITE, int(gl_color.buffer)) +cl_gl_position = cl.GLBuffer(context, mf.READ_WRITE, int(gl_position)) +cl_gl_color = cl.GLBuffer(context, mf.READ_WRITE, int(gl_color)) kernel = """__kernel void particle_fountain(__global float4* position, __global float4* color, -- GitLab