[wingide-users] RE: Wing and DirectPython again
sipickles at googlemail.com
Mon Jan 18 10:04:19 MST 2010
On 18/01/2010 16:50, Wingware Support wrote:
> Simon Pickles wrote:
>> On 14/01/2010 11:08, Simon Pickles wrote:
>>> >On 1/12/10 12:05 PM, Simon Pickles wrote:
>>> >>/ A while back I wrote about strange problems with Wing and
>>> />>/ DP is basically just calls into the C API, wrapping DirectX.
>>> />>/ Wing has two major flaws with this situation. Breakpoints and
>>> />>/ exceptions. Both cause Wing to hang if they occur after the
>>> />>/ DirectX device has been created (and the window, if that has
>>> any bearing).
>>> />>/ It is like the app is waiting for the debugger which is waiting
>>> for the app... Any suggestions?
>>> >There can be an issue with the floating point precision mode. Are
>>> you >running with the mode set to single precision (24 bit)?
>>> I think I was, yes.
>>> I changed my code to create a DirectX device with the
>>> D3DCREATE_FPU_PRESERVE flag, as specified here:
>> Actually, DirectPython uses DXUT framework to create its device and
>> the source code reveals the D3DDevice is created with FPU_PRESERVE
>> hr = pD3D->CreateDevice( pNewDeviceSettings->AdapterOrdinal,
>> pNewDeviceSettings->BehaviorFlags | D3DCREATE_FPU_PRESERVE,
>> &pNewDeviceSettings->pp, &pd3dDevice );
>> Shame. Anything else I can try?
> The only other thing I can think of is determining whether the calling
> thread is running in the correct mode. All this does, or seems to do,
> is to preserve the current mode. I don't know much about Direct X so
> don't have other suggestions.
> I think the bottom line is if you are running in single precision
> floating-point mode, then it won't work. We may try to fix this in
> the future, so the debugger does not depend on accurate floating-point
> Interestingly I saw in the Python 2.6.4 documentation the following:
> """Python does not support single-precision floating point numbers;
> the savings in processor and memory usage that are usually the reason
> for using these is dwarfed by the overhead of using objects in Python,
> so there is no reason to complicate the language with two kinds of
> floating point numbers."""
> I am not sure how this might impact our ability to properly support this.
Okay, thanks for the suggestions. I will continue my experiments and
report if I make any progress.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wingide-users