Il giorno sab, 19/06/2010 alle 15.04 -0400, Andreas Kloeckner ha
On Tue, 15 Jun 2010 12:02:07 +0200, Paolo Simone Gasparello
> Hi guys, anyone got OpenGL interoperability work?
> With the following patch I'm able to create a context sharing OpenGL
Applied, thanks. (And I'm kind of embarrassed that you had to fix
> Where fun_double is a kernel included in the file program.cl that
> does each coord *=3D 2.
> There are better ways to do this? I tryed to perform the cast to
> c_void_p in C++ code using boost::python, but I was not able to make
> code work.
I took a look, and it doesn't seem like ctypes has much in the way of
C-accessible interface. One can of course emulate the Python code in
C++, but I'm not sure that's necessary. If you'd like guidance on how
do that, let me know.
Lastly, would you mind posting a fully functional example so that I
add it to the examples/ directory shipped with PyOpenCL? I think
could be rather helpful for people trying to follow in your footsteps.
Thanks for your work!
I make my code doing ctypes casting in C++ work, so there is no more the
need to do that casting explicitly in python code. (patch attached)
I also wrote a simple example working on linux (I have used glX APIs and
flags) showing the usage of GL interop. It draws the sin function using
coordinates that are generated directly by the video hardware.
I hope this will be useful :)
Paolo Simone Gasparello <djgaspa(a)gmail.com>