MCPcopy Create free account
hub / github.com/Tencent/tgfx / CreateProgram

Method CreateProgram

src/gpu/glsl/GLSLProgramBuilder.cpp:108–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108std::shared_ptr<Program> ProgramBuilder::CreateProgram(Context* context,
109 const ProgramInfo* programInfo) {
110 GLSLProgramBuilder builder(context, programInfo);
111 if (!builder.emitAndInstallProcessors()) {
112 return nullptr;
113 }
114 auto program = builder.finalize();
115 if (program == nullptr) {
116 return nullptr;
117 }
118 return Resource::AddToCache(context, program.release());
119}
120
121GLSLProgramBuilder::GLSLProgramBuilder(Context* context, const ProgramInfo* programInfo)
122 : ProgramBuilder(context, programInfo), _varyingHandler(this), _uniformHandler(this),

Callers

nothing calls this directly

Calls 3

finalizeMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected