Dolphin 5.04 strange behavior before and after starting DirextX 8.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Dolphin 5.04 strange behavior before and after starting DirextX 8.0

Christoph J. Bachinger
Hi Andi,

after testing with DirectX 8.0 I got a very strange behavior of my
CAD-System due to inaccuraccy calculating. Using your example
in Re:Enableing windows events after Dirext-X 8.0 rendering ..

First Evaluate
0.00000000000000 - 1.570796326795
The result should be -1.570796326795 or I'm wrong

Then evaluate the code you gave to me.
______________________________________________________
shell := Shell show.
d3d := IDirectX8 new direct3DCreate.

"Notice I am using the uppercase version of GetAdapaterDisplayMode"
dispMode := D3DDISPLAYMODE new.
d3d GetAdapterDisplayMode: D3DADAPTER_DEFAULT DisplayMode: dispMode.

d3dWindow := D3DPRESENT_PARAMETERS new.
d3dWindow Windowed: 1.
d3dWindow SwapEffect: D3DSWAPEFFECT_COPY_VSYNC.
d3dWindow BackBufferFormat: dispMode Format.

d3dDevice := d3d createDevice: D3DADAPTER_DEFAULT deviceType:
D3DDEVTYPE_HAL hFocusWindow: shell view handle behaviorFlags:
D3DCREATE_SOFTWARE_VERTEXPROCESSING presentationParameters: d3dWindow
______________________________________________________
Then evaluate
0.00000000000000 - 1.570796326795
The result is -1.570796370506
ok its almost the same but for CAD not acceptable.

If I save the image and exit Dolphin and start Dolphin again every thing
is correct until I start DirectX 8.0 again.

any Ideas
Thanks


Reply | Threaded
Open this post in threaded view
|

Re: Dolphin 5.04 strange behavior before and after starting DirextX 8.0

Chris Uppal-3
Christoph J. Bachinger wrote:

> First Evaluate
> 0.00000000000000 - 1.570796326795
> The result should be -1.570796326795 or I'm wrong
>
> Then [...DirectX stuff...]
>
> Then evaluate
> 0.00000000000000 - 1.570796326795
> The result is -1.570796370506

I think this may be another case of an external library changing the floating
point control flags and not putting them back afterwards.  See this thread for
a few more details:

http://groups.google.co.uk/group/comp.lang.smalltalk.dolphin/browse_frm/thread/969c51cf966d3ddf/3d4d8bc0ed8a36b5

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Dolphin 5.04 strange behavior before and after starting DirextX 8.0

Christoph J. Bachinger
Hi Chris,

thanks a lot this solves my problems.

have a nice day
cjb


Chris Uppal schrieb:

> Christoph J. Bachinger wrote:
>
>
>>First Evaluate
>>0.00000000000000 - 1.570796326795
>>The result should be -1.570796326795 or I'm wrong
>>
>>Then [...DirectX stuff...]
>>
>>Then evaluate
>>0.00000000000000 - 1.570796326795
>>The result is -1.570796370506
>
>
> I think this may be another case of an external library changing the floating
> point control flags and not putting them back afterwards.  See this thread for
> a few more details:
>
> http://groups.google.co.uk/group/comp.lang.smalltalk.dolphin/browse_frm/thread/969c51cf966d3ddf/3d4d8bc0ed8a36b5
>
>     -- chris
>
>