I read on Scott Heiman's page (http://www.gnt.net/~heiman/opengl.htm) that
we can disable floating point exceptions with the following code:
_control87(MCW_EM, MCW_EM); /* defined in float.h */
This appears to work correctly. However, I'm writing just an OpenGL
component that other developers can stick into their forms: it would be
wrong of me to reprogram the FPU behaviour of the entire program. I'd like
to just be able to catch the floating point exceptions, and I don't know
how to do it.
I tried this code:
try {bunch of gl functions} catch (EMathError &err) {}
but it didn't work: the programs screen went blank and it crashed. (my
brother didn't relate what the error message was).
So: does anyone know, please, how to catch floating point exceptions
without reprogramming the FPU?
--
Lucian Wischik, Queens' College, Cambridge CB3 9ET. www.wischik.com/lu
_control87(MCW_EM,MCW_EM);
which is defined in float.h
--
Regards,
Scott
http://www.gnt.net/~heiman
Is there a list of "well-known problems" with Microsoft's implementation of
OpenGL 1.1 online somewhere? I have seen problems mixing fog and texture
mapping and would be interested in seeing a complete list of known defects.
-Paul Martz
Hewlett Packard Workstation Systems Lab
To reply, remove "DONTSPAM" from email address.