Further work on multiple context extensions.

This commit is contained in:
Robert Osfield
2002-09-16 20:58:05 +00:00
parent f006d081e5
commit 91df37b5c8
9 changed files with 272 additions and 89 deletions

View File

@@ -453,15 +453,13 @@ void Image::flipVertical(int image)
void Image::ensureValidSizeForTexturing()
void Image::ensureValidSizeForTexturing(GLint maxTextureSize)
{
int new_s = computeNearestPowerOfTwo(_s);
int new_t = computeNearestPowerOfTwo(_t);
static GLint max_size=Texture::getMaxTextureSize();
if (new_s>max_size) new_s = max_size;
if (new_t>max_size) new_t = max_size;
if (new_s>maxTextureSize) new_s = maxTextureSize;
if (new_t>maxTextureSize) new_t = maxTextureSize;
if (new_s!=_s || new_t!=_t)
{