Re: [PyOpenGL-Users] mixing C++ and python w/ opengl
Brought to you by:
mcfletch
From: Christopher B. <Chr...@no...> - 2011-01-25 22:30:41
|
On 1/25/11 2:22 PM, Philip Winston wrote: > Is it okay to draw stuff with pyopengl then call into C/C++ with ctypes > and then draw from there, directly with opengl C API? yep -- you can do this. You may want to try using Cython, rather than raw C. Some googling should tern up some notes on this. In particular I believe Sturla Molden put out a *.pxi file for OPenGL: http://groups.google.com/group/cython-users/browse_thread/thread/adc1495342da0779 In fact, at least some of PyOpenGL is written with Cython. > Rather than pull it into Python and then push it > back with pyopengl, it seems like we could just draw it from C, if that > is allowed. well, I don't know that I'd do it for this reason -- if you pull/push the data as numpy arrays, you can do all that without data copying, so keeping it in Python may be fine. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |