Merge branch 'development' into EngineAPI-Refactor

This commit is contained in:
Areloch 2018-12-09 14:48:50 -06:00 committed by GitHub
commit 3a71c75596
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1937 changed files with 102332 additions and 70549 deletions

View file

@ -531,9 +531,9 @@ bool ProcessedShaderMaterial::_createPasses( MaterialFeatureData &stageFeatures,
ShaderRenderPassData passData;
U32 texIndex = 0;
for( U32 i=0; i < FEATUREMGR->getFeatureCount(); i++ )
for( U32 featureIDx=0; featureIDx < FEATUREMGR->getFeatureCount(); featureIDx++ )
{
const FeatureInfo &info = FEATUREMGR->getAt( i );
const FeatureInfo &info = FEATUREMGR->getAt(featureIDx);
if ( !stageFeatures.features.hasFeature( *info.type ) )
continue;
@ -562,7 +562,7 @@ bool ProcessedShaderMaterial::_createPasses( MaterialFeatureData &stageFeatures,
#if defined(TORQUE_DEBUG) && defined( TORQUE_OPENGL)
if(oldTexNumber != texIndex)
{
for(int i = oldTexNumber; i < texIndex; i++)
for(int texNum = oldTexNumber; texNum < texIndex; texNum++)
{
AssertFatal(passData.mSamplerNames[ oldTexNumber ].isNotEmpty(), avar( "ERROR: ShaderGen feature %s don't set used sampler name", info.feature->getName().c_str()) );
}
@ -579,9 +579,9 @@ bool ProcessedShaderMaterial::_createPasses( MaterialFeatureData &stageFeatures,
}
#if defined(TORQUE_DEBUG) && defined( TORQUE_OPENGL)
for(int i = 0; i < texIndex; i++)
for(int samplerIDx = 0; samplerIDx < texIndex; samplerIDx++)
{
AssertFatal(passData.mSamplerNames[ i ].isNotEmpty(),"");
AssertFatal(passData.mSamplerNames[samplerIDx].isNotEmpty(),"");
}
#endif

View file

@ -363,17 +363,17 @@ bool ShaderData::_checkDefinition(GFXShader *shader)
{
if( !shader->findShaderConstHandle( String::ToString("$rtParams%d", pos)) )
{
String error = String::ToString("ShaderData(%s) sampler[%d] used but rtParams%d not used in shader compilation. Possible error", shader->getPixelShaderFile().c_str(), pos, pos);
Con::errorf( error );
String errStr = String::ToString("ShaderData(%s) sampler[%d] used but rtParams%d not used in shader compilation. Possible error", shader->getPixelShaderFile().c_str(), pos, pos);
Con::errorf(errStr);
error = true;
}
}
if(!find)
{
String error = String::ToString("ShaderData(%s) sampler %s not defined", shader->getPixelShaderFile().c_str(), samplers[i].c_str());
Con::errorf(error );
GFXAssertFatal(0, error );
String errStr = String::ToString("ShaderData(%s) sampler %s not defined", shader->getPixelShaderFile().c_str(), samplers[i].c_str());
Con::errorf(errStr);
GFXAssertFatal(0, errStr);
error = true;
}
}