MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / CreateFromFiles

Method CreateFromFiles

GTE/Graphics/ProgramFactory.cpp:25–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25std::shared_ptr<VisualProgram> ProgramFactory::CreateFromFiles(
26 std::string const& vsFile, std::string const& psFile,
27 std::string const& gsFile)
28{
29 LogAssert(vsFile != "" && psFile != "",
30 "A program must have a vertex shader and a pixel shader.");
31
32 std::string vsSource = GetStringFromFile(vsFile);
33 LogAssert(vsSource != "", "Empty vertex shader source string.");
34
35 std::string psSource = GetStringFromFile(psFile);
36 LogAssert(psSource != "", "Empty pixel shader source string.");
37
38 std::string gsSource = "";
39 if (gsFile != "")
40 {
41 gsSource = GetStringFromFile(gsFile);
42 LogAssert(gsSource != "", "Empty geometry shader source string.");
43 }
44
45 return CreateFromNamedSources(vsFile, vsSource, psFile, psSource, gsFile, gsSource);
46}
47
48std::shared_ptr<VisualProgram> ProgramFactory::CreateFromSources(
49 std::string const& vsSource, std::string const& psSource,

Callers 15

CreateSceneMethod · 0.80
CreateSceneMethod · 0.80
CreateSceneMethod · 0.80
BlendedTerrainEffectMethod · 0.80
SMSceneEffectMethod · 0.80
SMShadowEffectMethod · 0.80
SMUnlitEffectMethod · 0.80
CreateSceneMethod · 0.80
ReflectVertexColoringMethod · 0.80
ReflectTexturingMethod · 0.80
ReflectBillboardsMethod · 0.80
ReflectTextureArraysMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected