Direct3D retained mode (EInvalidOp)

Direct3D retained mode (EInvalidOp)

Post by Frédéric LUC » Wed, 15 Apr 1998 04:00:00



I'm trying to use Direct3D retained mode with BC++Builder to display a
height-field (z=f(x,y) function). But it seems to produce random invalid
operation (EInvalidOp) or division byzero (EDivideByZero).
Sometimes, I can recover from these exceptions, but only for a while.
Using de*, I found that it crashes during a call to Render()
function (IDirect3DRMViewport method).
I compiled the 'viewer' DX5SDK example (with some minor modifications to
compile it properly with BC++Builder). It crashed with the same error at
the very beginning, but it can recover and the Microsoft logo turn in
space for 180deg before a new exception comes.
It seems that some specific angles produce those crashes.
Does anybody have the same (or nearly) problem ?
Is it a BC++Builder bug, a direct3D bug or have I done something wrong ?

I can mail you the source code if you need.

Thanks

 
 
 

Direct3D retained mode (EInvalidOp)

Post by Dea » Sat, 18 Apr 1998 04:00:00


On Tue, 14 Apr 1998 11:09:52 +0200, "Frdric LUCE"


>I'm trying to use Direct3D retained mode with BC++Builder to display a
>height-field (z=f(x,y) function). But it seems to produce random invalid
>operation (EInvalidOp) or division byzero (EDivideByZero).
>Sometimes, I can recover from these exceptions, but only for a while.
>Using de*, I found that it crashes during a call to Render()
>function (IDirect3DRMViewport method).
>I compiled the 'viewer' DX5SDK example (with some minor modifications to
>compile it properly with BC++Builder). It crashed with the same error at
>the very beginning, but it can recover and the Microsoft logo turn in
>space for 180deg before a new exception comes.
>It seems that some specific angles produce those crashes.
>Does anybody have the same (or nearly) problem ?
>Is it a BC++Builder bug, a direct3D bug or have I done something wrong ?

The EInvalidOp exceptions occurs because Builder initializes your FPU
differently to what MS expects it to.  It's a simple matter of putting
the line:

_control87( MCW_EM, MCW_EM );

before you do anything.  (you have to #include <float.h> for it work)

Dean.

 
 
 

1. Direct3D Retained Mode

Can anyone point me at any on-line resources which might help me to gently
transition from OpenGL to Direct3D retained mode? Failing that can anyone
recommend a good book?
First impressions are that there is a very strong (almost one to one)
correspondence. Would anyone care to point out the main differences?

Many thanks
Des

2. Inventor: scaling components in a hierarchy

3. Newbie Direct3D Retained Mode Question...

4. electric image demo

5. 3DFX supported by Direct3D retained mode?

6. Scanner Suggestions?

7. Troubles with RayPick (Direct3D Retained Mode)

8. 3D FESTIVAL AWARDS

9. Direct3d Retained Mode Application

10. errors with Direct3D Retained Mode

11. Drawing lines in Direct3D Retained Mode

12. Direct3D Retained mode docs...

13. what's the difference between immediate mode and retained mode