gl unit needs Set8087CW under Linux too
Original Reporter info from Mantis: Michalis @michaliskambi
-
Reporter name: Michalis Kamburelis
Original Reporter info from Mantis: Michalis @michaliskambi
- Reporter name: Michalis Kamburelis
Description:
This is similar to issue #5914 (closed) where I described why Set8087CW call is needed on Win32 at the initialization of GL unit. In short, that's because OpenGL libraries under Win32 may produce (under valid circumstances) some exceptions that should be ignored.
As it comes out, under Linux some OpenGL implementations do it too.
- With NVidia graphic card. I have GeForce FX 5200, using NVidia driver and OpenGL implementation version 1.0-8774. (But I realized that I already saw this bug on other NVidia cards and with older driver versions). If you try to create a context without depth buffer, then the first try to set this context as current will result in div by zero exception.
This is reproducible on my system with opengl package examples. glxtest fails inside glXMakeCurrent call. bounce (the only GLUT test that doesn't request depth buffer) fails inside glutCreateWindow (this makes sense, since glutCreateWindow calls glXMakeCurrent internally).
- Open-source Radeon drivers may also cause this --- I don't have any simple example to reproduce this, but it was experienced Daniel Mantione when running my game "The Castle". The graphic card was Radeon Mobility M7. Error occured as soon as "New Game" was chosen: EDivByZero was raised from inside of glCallList inside TVRMLFlatSceneGL.SSS_RenderShapeState. Disabling fp exceptions fixed the problem.
Summary: we have to make Set8087CW call in the initialization of GL unit for Linux too. Probably FreeBSD also requires this (since NVidia OpenGL on FreeBSD probably also causes this problem). I think that the safest solution is to make Set8087CW($133F); just work on all systems (i.e., remove the "$IFDEF WIN32" around it).
Mantis conversion info:
- Mantis ID: 7570
- OS: Linux
- Fixed in version: 2.2.0
- Fixed in revision: 4834 (#f6890250)