From 97336b89ac69d9fa6d8fce67fcc051206c5a1855 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 17 Feb 2016 15:59:13 +0000 Subject: [PATCH] Introduced a separate GLuint64 one variable to get around a 32bit build timer issue under Windows. --- src/osgViewer/Renderer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/osgViewer/Renderer.cpp b/src/osgViewer/Renderer.cpp index ae8979ec2..68467de7c 100644 --- a/src/osgViewer/Renderer.cpp +++ b/src/osgViewer/Renderer.cpp @@ -228,11 +228,12 @@ void ARBQuerySupport::checkQuery(osg::Stats* stats, osg::State* state, // If the high bits on any of the timestamp bits are // different then the counters may have wrapped. const int hiShift = (tbits - 1); - const GLuint64 hiMask = 1 << hiShift; + const GLuint64 one = 1; + const GLuint64 hiMask = one << hiShift; const GLuint64 sum = (beginTimestamp >> hiShift) + (endTimestamp >> hiShift) + (gpuTimestamp >> hiShift); if (sum == 1 || sum == 2) { - const GLuint64 wrapAdd = 1 << tbits; + const GLuint64 wrapAdd = one << tbits; // Counter wrapped between begin and end? if (beginTimestamp > endTimestamp) {