Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Help! Error with 3dfx acceleration!

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2000
    Location
    Gladenbach, Hessen, Germany
    Posts
    11

    Help! Error with 3dfx acceleration!

    Hello!

    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

  2. #2
    Junior Member Regular Contributor
    Join Date
    Mar 2000
    Location
    Germany
    Posts
    184

    Re: Help! Error with 3dfx acceleration!

    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

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2000
    Location
    Gladenbach, Hessen, Germany
    Posts
    11

    Re: Help! Error with 3dfx acceleration!

    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

  4. #4
    Intern Contributor
    Join Date
    Feb 2000
    Location
    Germany
    Posts
    87

    Re: Help! Error with 3dfx acceleration!

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •