Win32, COM, DLLs and DirectX

GambiT gambit at yourwap.com
Fri Oct 18 07:22:33 EDT 2002


Hi everyone,

I am quite new to Python, and as a game developper I am looking forward
using it in development tools (like graphical editors and so on).
I know useful graphical libraries like OpenGL and SDL are available (not
mentionning GUIs) from Python code, but I wanted to do a little check by
myself about DirectX.

Talking about a specific tool, it can be possible to think about all DirectX
features I need and use a DLL to be loaded in Python to call them. But for
the moment I wanted to know how deep into DirectX I can dive from Python.

First thing I tried is COM objects, or I would better say DirectX Type
Librairy for Visual Basic. I do not quite understand really what is the
difference between this and an usual COM object, but it seems I cannot
access DirectX features this way. At best, I can obtain a IDirectx8
interface object, but no further (as DirectX methods are stored in vtables I
cannot access and it seems other intrefaces do not support IDispatch - then
I cannot instantiate any other type of object)

Then I looked at dynwin and calldll stuff, and loaded DX DLLs. Methods are
accessible this way, but as there is no type support for DX objetcs this
way, I cannot do much with returned objects (for example I can create a
device from DX top-level interface loaded from the DLL, but then I cannot
access the device object's methods)

I read on the pycom-dev ML that someone has coded the Invoke() and
InvokeTypes() methods for PyITypeInfo, and making win32com.client support
vtable interfaces. I am not there yet, as I do not have any experience of
Python in-depth coding.

Could someone give me some advice, or someone has maybe run into the same
problem. Any kind of help would be appreciated.

Thanks,
Alexis





More information about the Python-list mailing list