[DirectPython] Passing IDirect3DDevice9* to c++ function from DirectPython
Status: Inactive
Brought to you by:
hsalo
From: Simon P. <sip...@ho...> - 2009-06-08 12:57:02
|
Hi, Is it possible to use d3d.getDevice() to pass the created IDirect3DDevice9 to a c++ function? Using boost::python, I have an extension module function with this signature: // c++ void TestClass::Init( IDirect3DDevice9* device ); I am trying to call this function with: #python, called after device is created: from testClass import TestClass test = TestClass() test.Init( d3d.getDevice() ) Here's the error I get: ################## Traceback (most recent call last): File "client.py", line 31, in __init__ test.Init(d3d.getDevice()) Boost.Python.ArgumentError: Python argument types in TestClass.Init(TestClass, long) did not match C++ signature: Init(class TestClass {lvalue}, struct IDirect3DDevice9 *) ################## See how I have a type mismatch? How come d3d.getDevice() returns a long? Do I need to use COM to get this sort of functionality? Ie, get a device to pass to c++? Thanks Simon |