diff --git a/simgear b/simgear new file mode 160000 index 000000000..d11db8a67 --- /dev/null +++ b/simgear @@ -0,0 +1 @@ +Subproject commit d11db8a67ad43adff97a68b51a83570b2a5e02bf diff --git a/src/Main/main.cxx b/src/Main/main.cxx index abb786253..b51bd01a0 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -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();