MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / hasSamplerDef

Method hasSamplerDef

Engine/source/materials/shaderData.cpp:322–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320}
321
322bool ShaderData::hasSamplerDef(const String &_samplerName, int &pos) const
323{
324 String samplerName = _samplerName.startsWith("$") ? _samplerName : "$"+_samplerName;
325 for(int i = 0; i < NumTextures; ++i)
326 {
327 if( mSamplerNames[i].equal(samplerName, String::NoCase ) )
328 {
329 pos = i;
330 return true;
331 }
332 }
333
334 pos = -1;
335 return false;
336}
337
338bool ShaderData::_checkDefinition(GFXShader *shader)
339{

Callers 1

onAddMethod · 0.80

Calls 2

startsWithMethod · 0.80
equalMethod · 0.45

Tested by

no test coverage detected