Re: [DirectPython] Problem Running Direct.Python Samples
Status: Inactive
Brought to you by:
hsalo
From: Heikki S. <ho...@gm...> - 2006-12-13 09:05:10
|
> A problem running DirectPython Samples. When I try to run any=20 > of the samples with DirectPython I have the following result: > xxxxxxxxxxxxxxx > Traceback (most recent call last): > File=20 > "C:\Python25\Lib\site-packages\directpy\samples\sampleBasic.py > ", line 147, in <module> > mainloop() > File=20 > "C:\Python25\Lib\site-packages\directpy\samples\sampleBasic.py > ", line 75, in mainloop > d3d.createDevice(title, u"textures/x.ico", window[2],=20 > window[3], False, CREATE.HARDWARE) > RuntimeError: Failed to create a device > xxxxxxxxxxxxxxxxxxxxxxx >=20 > I take it that the reference is to the following in d3dx: > xxxxxxxxxxxxxxx > class Frame(object): > def __init__(self, title, fullscreen=3DFalse, area=3D(200,=20 > 100, 800, 600)): > d3d.createDevice(title, u"textures/x.ico", area[2], area[3],=20 > fullscreen, CREATE.HARDWARE) > =20 > if not fullscreen: > d3d.setWindow(*area) > xxxxxxxxxxxxxxxxxxxxxxxxxxxxx >=20 > I was unable to find anything like =13CREATE.HARDWARE=14 in the=20 > DirectX documentation and help materials. Also, I found the=20 > following sort of code as implementations of the=20 > d3d.CreateDevice( ) syntax and it looks entirely different: > xxxxxxxxxxxxxxxxxxxxxx > D3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, > D3DCREATE_SOFTWARE_VERTEXPROCESSING,@d3dpp, D3DDevice)=20 > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Would someone advise if the=20 > problem lies in the =13CREATE.HARDWARE=14 command, the=20 > d3d.CreateDevice( ) syntax in d3dx, or possible somewhere else?=20 >=20 > Thanks >=20 > Bill >=20 It is hard to say what fails from here. Do other Direct3D samples or applications work properly? What does dxdiag.exe say? What card and operating system do you have? Have you updated your drivers? You can also try out the traditional way and replace the CREATE.HARDWARE with CREATE.SOFTWARE | CREATE.NOCAPCHECK and see what happends.=20 -- Heikki Salo |