View Issue Details

IDProjectCategoryView StatusLast Update
0007570FPCPackagespublic2007-01-01 20:41
ReporterMichalis Kamburelis Assigned ToFlorian  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
OSLinux 
Fixed in Version2.2.0 
Summary0007570: gl unit needs Set8087CW under Linux too
DescriptionThis is similar to issue 0005914 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.

1. 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).

2. 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).
TagsNo tags attached.
Fixed in Revision4834
FPCOldBugId
FPCTarget
Attached Files

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2006-10-08 16:30 Michalis Kamburelis New Issue
2006-10-08 18:36 Florian Fixed in Revision => 4834
2006-10-08 18:36 Florian Status new => resolved
2006-10-08 18:36 Florian Fixed in Version => 2.1.1
2006-10-08 18:36 Florian Resolution open => fixed
2006-10-08 18:36 Florian Assigned To => Florian
2007-01-01 20:41 Florian Status resolved => closed