From 166df28906dcfa1e7758d9e97e5e4e0b6de781f7 Mon Sep 17 00:00:00 2001 From: Nikolay Kasyanov Date: Wed, 19 Aug 2015 21:23:16 +0200 Subject: [PATCH] OS X cursor workaround build fix --- components/sdlutil/sdlcursormanager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/sdlutil/sdlcursormanager.cpp b/components/sdlutil/sdlcursormanager.cpp index b64b68132..e1a67aff8 100644 --- a/components/sdlutil/sdlcursormanager.cpp +++ b/components/sdlutil/sdlcursormanager.cpp @@ -126,14 +126,16 @@ namespace glViewport(0, 0, width, height); + osg::ref_ptr geom; + #if defined(__APPLE__) // Extra flip needed on Intel graphics OS X systems due to a driver bug std::string vendorString = (const char*)glGetString(GL_VENDOR); if (vendorString.find("Intel") != std::string::npos) - osg::ref_ptr geom = osg::createTexturedQuadGeometry(osg::Vec3(-1,1,0), osg::Vec3(2,0,0), osg::Vec3(0,-2,0)); + geom = osg::createTexturedQuadGeometry(osg::Vec3(-1,1,0), osg::Vec3(2,0,0), osg::Vec3(0,-2,0)); else #endif - osg::ref_ptr geom = osg::createTexturedQuadGeometry(osg::Vec3(-1,-1,0), osg::Vec3(2,0,0), osg::Vec3(0,2,0)); + geom = osg::createTexturedQuadGeometry(osg::Vec3(-1,-1,0), osg::Vec3(2,0,0), osg::Vec3(0,2,0)); geom->drawImplementation(renderInfo);