...and logging of texture size limits.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3192 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
889c86aa47
commit
66fbfc1c1c
@ -391,6 +391,7 @@
|
||||
texture.load.noName = $error;
|
||||
texture.load.queueTask.inconsistency = $error;
|
||||
texture.load.rescale = $textureDebug;
|
||||
texture.load.rescale.maxSize = inherit;
|
||||
texture.load.unknownType = $error;
|
||||
|
||||
|
||||
|
@ -249,12 +249,15 @@ static BOOL sHaveSetUp = NO;
|
||||
GLint maxSize;
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxSize);
|
||||
sGLMaxSize = MAX(maxSize, 64);
|
||||
OOLog(@"texture.load.rescale.maxSize", @"GL maximum texture size: %u", sGLMaxSize);
|
||||
|
||||
// Why 0x80000000? Because it's the biggest number OORoundUpToPowerOf2() can handle.
|
||||
sUserMaxSize = [[NSUserDefaults standardUserDefaults] oo_unsignedIntForKey:@"max-texture-size" defaultValue:0x80000000];
|
||||
if (sUserMaxSize < 0x80000000) OOLog(@"texture.load.rescale.maxSize", @"User maximum texture size: %u", sUserMaxSize);
|
||||
sUserMaxSize = OORoundUpToPowerOf2(sUserMaxSize);
|
||||
sUserMaxSize = MAX(sUserMaxSize, 64U);
|
||||
|
||||
|
||||
sHaveSetUp = YES;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user