Update glstate.cpp

Modify the texture size for  higher resolution games
The code 
//Set max texture size to 16384 if conf.maxTextureSize is 0
......
.....
was forked from joiplay/mkxp
This commit is contained in:
pk-2000 2020-04-06 00:22:32 +00:00 committed by GitHub
parent c086cdf41d
commit b12bc9f2c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -120,9 +120,16 @@ GLState::GLState(const Config &conf)
blendMode.init(BlendNormal); blendMode.init(BlendNormal);
blend.init(true); blend.init(true);
scissorTest.init(false); scissorTest.init(false);
scissorBox.init(IntRect(0, 0, 640, 480)); scissorBox.init(IntRect(0, 0, conf.defScreenW, conf.defScreenH));
program.init(0); program.init(0);
if (conf.maxTextureSize > 0) if (conf.maxTextureSize > 0)
caps.maxTexSize = conf.maxTextureSize; caps.maxTexSize = conf.maxTextureSize;
//Set max texture size to 16384 if conf.maxTextureSize is 0
if (conf.maxTextureSize > 0){
caps.maxTexSize = conf.maxTextureSize;
} else {
caps.maxTexSize = 16384;
}
} }