Frequently asked questions

1. General

1.1 - What is the difference between the “old” DirectPython and DirectPython 11?

A lot. The old DirectPython was a quick-and-dirty wrapper around some useful DirectX 9.0 API’s. It was not a 1:1-mapping and intentionally left many parts out. However, because of this it was relatively lightweight and easy to learn and use.

DirectPython 11 is a more direct wrapper and does not attempt to hide so many things. This probably makes it slightly more difficult to use but also gives much more power to the programmer. Still, many classes have been “pythonized”. For example the Buffer container class behaves mostly like a normal Python list.

Another advantage is that documentation between the Direct3D 11 C++ API and DirectPython 11 is relatively similar and it is easier to adapt code samples and help from other sources.

1.2 - Do I need a graphics card that supports Direct3D 11 in order to use DirectPython 11?

No. Many people assume that you need a brand new Direct3D 11 card if you want to use Direct3D 11. In fact with Direct3D 11 you can target hardware from Direct3D 9.0 to Direct3D 11. It was designed so that programmers can use a common API to easily target large variety of hardware. Of course many features are only supported by certain cards, but it is possible to create a Direct3D 11 application that runs on Direct 9.0 hardware as long as you don’t use D3D10/D3D11-only features. If you use a WARP-device (software) you don’t even need a GPU. See System requirements.

2. Technical

2.1 - Some methods silently fail without raising exceptions.

Direct3D 11 makes very little checks unless you are using a debug runtime. Because of this DirectPython can’t know if they failed or not. See Debugging Direct3D and DirectPython.

2.2 - My floating point values change when passing them to DirectPython and back.

DirectPython and Direct3D use 32-bit floating point values. Python’s float is actually a double (64-bits). So when you pass it to DirectPython it is converted into a float and probably loses some of it’s accuracy. This is not usually a big problem but it is something to be aware of if your calcuations demand great numerical stability.

Table Of Contents

Get DirectPython 11 at SourceForge.net. Fast, secure and Free Open Source software downloads