I'm having a problem when using the 3dfx hardware acceleration: when I call glVertex3f (0, 0, 0) I get an 'DivisionThroughZero' error. This also appears when, after using gluPerspective, an object clips to the front plane.

If I use the Microsoft Implementation, the error doesn't appear. I'm using a Voodoo Banshee card and used GLSetup to get the hardware support.

Does anybody have an idea why this happens or had the same error? Please tell me!

Thank you and sorry for that poor english,
Steffen

lgrosshennig

04-04-2000, 11:47 AM

Hi Steffen!

Well, from my point of view there is only one thing to say:

"The 3dfx driver you are using is buggy".

It should never crash if you parse a zero vector to it. I advice that you eigther use a newer driver, or that you use an older driver. If that doesn't work try the following:

glVertex3f (0f, 0f, 0.0000000001f);

Well it's a kind of an ugly work a round but if it's working, who cares...)

May the (zero) vector be with you!

Regards,

LG http://www.opengl.org/discussion_boards/ubb/biggrin.gif

Steffen Müller

04-05-2000, 11:03 AM

Thanks LG!

Five minutes ago I found out the problem was my compiler: to use the 3dfx OpenGL driver with the Borland C++ Builder without errors, I simply had to add an quite ugly function call in the initialisation:
_control87(MCW_EM, MCW_EM);
I don't know for sure what exactly it does, but it switches off the floating point exceptions.

Bye and thanx again,
Steffen

Inquisitor

04-06-2000, 01:03 AM

Just to prevent you from having even more headaches when using C++Builder:
The debugger has some bugs that will result in floating point exceptions like the ones you already experienced. So, next time you get one just try starting your app directly, and voilá...
Looks like the debugger resets the FPU to the mode it was before your _control call.