Commit c3d263ec authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files

Enable npo2 textures for opensim var-region compat sadness

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