Help! Wrapping Win32 code with SWIG - or am I barking up the wrong tree!

ebe ebe at offworld.com
Fri Nov 8 06:55:29 EST 2002


Hello,

I have written a game engine in C++ that I want to control at a high level
from python. Effectively Python will be used to construct the game logic
while the C++ engine handles all the low level performance critical stuff.

I have a problem however, and I've yet to find ANY docs on this at all. I am
attemping to wrap my C++ engine using SWIG, but I have win32 code which
creates a main window and gets a device context to enable open gl to draw
into it. How on earth do I wrap win32 api code using SWIG?

I've seen that Python has win32 extensions, and I could use these to create
a main window and get a device context, but how would  my C++ engine get
access to these? Can C++ extensions have access to Python variables?

Which is the best way of proceeding?

Any help would be appreciated, thanks!





More information about the Python-list mailing list