# HG changeset patch # User John Tsiombikas # Date 1283748047 -3600 # Node ID e3b4457dc4d2b536b1a99769af5ab8571bbf1d23 # Parent 54a96b738afe71c06ae62ca0eb69493ff4cebb79 added glFinish after swap-buffers to make the program absolutely correct in regards to mediating usage of the shared GL/CL texture image diff -r 54a96b738afe -r e3b4457dc4d2 src/clray.cc --- a/src/clray.cc Sun Sep 05 16:43:55 2010 +0100 +++ b/src/clray.cc Mon Sep 06 05:40:47 2010 +0100 @@ -212,6 +212,11 @@ } glutSwapBuffers(); + + /* We need to make sure OpenGL has finished with the texture + * before allowing the OpenCL kernel to run again. + */ + glFinish(); } void reshape(int x, int y)