Skip to content
Snippets Groups Projects
Commit c3d263ec authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Enable npo2 textures for opensim var-region compat sadness

parent 88ad185d
Branches
Tags
No related merge requests found
...@@ -494,12 +494,14 @@ bool LLImageGL::setSize(S32 width, S32 height, S32 ncomponents, S32 discard_leve ...@@ -494,12 +494,14 @@ bool LLImageGL::setSize(S32 width, S32 height, S32 ncomponents, S32 discard_leve
{ {
if (width != mWidth || height != mHeight || ncomponents != mComponents) if (width != mWidth || height != mHeight || ncomponents != mComponents)
{ {
#ifdef NO_STUPID
// Check if dimensions are a power of two! // Check if dimensions are a power of two!
if (!checkSize(width,height)) if (!checkSize(width,height))
{ {
LL_WARNS() << llformat("Texture has non power of two dimension: %dx%d",width,height) << LL_ENDL; LL_WARNS() << llformat("Texture has non power of two dimension: %dx%d",width,height) << LL_ENDL;
return false; return false;
} }
#endif
if (mTexName) if (mTexName)
{ {
...@@ -1248,11 +1250,15 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S ...@@ -1248,11 +1250,15 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
S32 h = raw_h << discard_level; S32 h = raw_h << discard_level;
// setSize may call destroyGLTexture if the size does not match // setSize may call destroyGLTexture if the size does not match
#ifdef NO_STUPID
if (!setSize(w, h, imageraw->getComponents(), discard_level)) if (!setSize(w, h, imageraw->getComponents(), discard_level))
{ {
LL_WARNS() << "Trying to create a texture with incorrect dimensions!" << LL_ENDL; LL_WARNS() << "Trying to create a texture with incorrect dimensions!" << LL_ENDL;
return FALSE; return FALSE;
} }
#else
setSize(w, h, imageraw->getComponents(), discard_level);
#endif
if( !mHasExplicitFormat ) if( !mHasExplicitFormat )
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment