Merge branch 'development' into stringTableEmptyString

This commit is contained in:
Thomas Dickerson 2017-01-24 12:35:34 -05:00 committed by GitHub
commit 6963d35145
120 changed files with 2503 additions and 5816 deletions

View file

@ -327,7 +327,10 @@ void GBitmap::allocateBitmap(const U32 in_width, const U32 in_height, const bool
mNumMipLevels++;
allocPixels += currWidth * currHeight * mBytesPerPixel;
} while (currWidth != 1 && currHeight != 1);
} while (currWidth != 1 || currHeight != 1);
U32 expectedMips = mFloor(mLog2(mMax(in_width, in_height))) + 1;
AssertFatal(mNumMipLevels == expectedMips, "GBitmap::allocateBitmap: mipmap count wrong");
}
AssertFatal(mNumMipLevels <= c_maxMipLevels, "GBitmap::allocateBitmap: too many miplevels");

View file

@ -178,7 +178,7 @@ void GFXShader::_unlinkBuffer( GFXShaderConstBuffer *buf )
DefineEngineFunction( addGlobalShaderMacro, void,
( const char *name, const char *value ), ( NULL ),
( const char *name, const char *value ), ( nullAsType<const char*>() ),
"Adds a global shader macro which will be merged with the script defined "
"macros on every shader. The macro will replace the value of an existing "
"macro of the same name. For the new macro to take effect all the shaders "

View file

@ -1085,21 +1085,7 @@ void GFXTextureManager::_validateTexParams( const U32 width, const U32 height,
// NOTE: Does this belong here?
if( inOutNumMips == 0 && !autoGenSupp )
{
U32 currWidth = width;
U32 currHeight = height;
inOutNumMips = 1;
do
{
currWidth >>= 1;
currHeight >>= 1;
if( currWidth == 0 )
currWidth = 1;
if( currHeight == 0 )
currHeight = 1;
inOutNumMips++;
} while ( currWidth != 1 && currHeight != 1 );
inOutNumMips = mFloor(mLog2(mMax(width, height))) + 1;
}
}
}

View file

@ -340,7 +340,7 @@ DefineEngineFunction( stopVideoCapture, void, (),,
DefineEngineFunction( playJournalToVideo, void,
( const char *journalFile, const char *videoFile, const char *encoder, F32 framerate, Point2I resolution ),
( NULL, "THEORA", 30.0f, Point2I::Zero ),
( nullAsType<const char*>(), "THEORA", 30.0f, Point2I::Zero ),
"Load a journal file and capture it video.\n"
"@ingroup Rendering\n" )
{
@ -357,4 +357,4 @@ DefineEngineFunction( playJournalToVideo, void,
VIDCAP->waitForCanvas();
Journal::Play( journalFile );
}
}