From c8901d77a2bacca671d26efd92c728ce2e415b46 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 27 Oct 2009 19:17:38 +0000 Subject: [PATCH] Fixed build aginst GLES1 and GLES2 --- src/osgDB/DatabasePager.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/osgDB/DatabasePager.cpp b/src/osgDB/DatabasePager.cpp index 6f58822b9..b0097a968 100644 --- a/src/osgDB/DatabasePager.cpp +++ b/src/osgDB/DatabasePager.cpp @@ -2007,7 +2007,9 @@ void DatabasePager::compileGLObjects(osg::State& state, double& availableTime) if (!dtc.first.empty() && (elapsedTime+estimatedTextureDuration)compileGLObjects(state); - GLint p; - glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_RESIDENT, &p); + #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) + GLint p; + glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_RESIDENT, &p); + #endif elapsedTime = timer.delta_s(start_tick,timer.tick()); - // estimate the duration of the compile based on current compile duration. estimatedTextureDuration = (elapsedTime-startCompileTime);