From 4f4f68e961321ab50bd75a0b42466934b86a13cf Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 19 Jun 2002 18:45:05 +0000 Subject: [PATCH] Added support for reading the new OSG_MAX_TEXTURE_SIZE environmental variable inside the osg::Image::ensureValidSizeForTexturing() method. The smallest of GL_MAX_TEXTURE_SIZE and OSG_MAX_TEXTURE_SIZE is used for the final max texture size. This new env. var. allows users to deliberate cap the size of their textures so they can test whether their models are limited by texture memory. If reducing the max texture size increases performance then you are limited by texture memory! --- src/osg/Image.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/osg/Image.cpp b/src/osg/Image.cpp index d2d80f002..026b8e86d 100644 --- a/src/osg/Image.cpp +++ b/src/osg/Image.cpp @@ -431,9 +431,24 @@ void Image::ensureValidSizeForTexturing() { init = false; glGetIntegerv(GL_MAX_TEXTURE_SIZE,&max_size); - notify(INFO) << "Max texture size "<max_size) new_s = max_size;