MCPcopy Create free account
hub / github.com/JACoders/OpenJK / ParseShaders

Method ParseShaders

code/cgame/FxTemplate.cpp:1401–1420  ·  view source on GitHub ↗

------------------------------------------------------ ParseShaders Reads in a group of shaders and registers them input: Parse group that contains the list of shaders to parse return: success of parse operation. ------------------------------------------------------

Source from the content-addressed store, hash-verified

1399// success of parse operation.
1400//------------------------------------------------------
1401bool CPrimitiveTemplate::ParseShaders( const CGPProperty& grp )
1402{
1403 bool any = false;
1404 for( auto& value : grp.GetValues() )
1405 {
1406 if( !value.empty() )
1407 {
1408 any = true;
1409 int handle = theFxHelper.RegisterShader( value );
1410 mMediaHandles.AddHandle( handle );
1411 }
1412 }
1413 if( !any )
1414 {
1415 // empty "list"
1416 theFxHelper.Print( "CPrimitiveTemplate::ParseShaders called with an empty list!\n" );
1417 return false;
1418 }
1419 return true;
1420}
1421
1422//------------------------------------------------------
1423// ParseSounds

Callers

nothing calls this directly

Calls 4

emptyMethod · 0.45
RegisterShaderMethod · 0.45
AddHandleMethod · 0.45
PrintMethod · 0.45

Tested by

no test coverage detected