1
0
Fork 0

Bug #385 - enable the Ati viewport hack on next.

Enabling this hack by default, to assess the impact for everyone. Should fix the issue for Ati Catalyst 11.5 users, and hopefully no impact for everyone else. All feedback appreciated. Set /sim/ati-viewport-hack to false if you think this option might be causing issues for you (and then tell James, ASAP)
This commit is contained in:
James Turner 2013-01-28 23:35:44 +00:00
parent e27be6ee92
commit 4ca85f2653
2 changed files with 16 additions and 0 deletions

1
simgear Submodule

@ -0,0 +1 @@
Subproject commit d11db8a67ad43adff97a68b51a83570b2a5e02bf

View file

@ -262,6 +262,16 @@ static void upper_case_property(const char *name)
p->addChangeListener(new FGMakeUpperCase);
}
// see http://code.google.com/p/flightgear-bugs/issues/detail?id=385
// for the details of this.
static void ATIScreenSizeHack()
{
osg::ref_ptr<osg::Camera> hackCam = new osg::Camera;
hackCam->setRenderOrder(osg::Camera::PRE_RENDER);
int prettyMuchAnyInt = 1;
hackCam->setViewport(0, 0, prettyMuchAnyInt, prettyMuchAnyInt);
globals->get_renderer()->addCamera(hackCam, false);
}
// Main top level initialization
int fgMainInit( int argc, char **argv ) {
@ -320,6 +330,11 @@ int fgMainInit( int argc, char **argv ) {
fntInit();
fgSplashInit();
if (fgGetBool("/sim/ati-viewport-hack", true)) {
SG_LOG(SG_GENERAL, SG_ALERT, "Enabling ATI viewport hack");
ATIScreenSizeHack();
}
// pass control off to the master event handler
int result = fgOSMainLoop();