| 176 | } |
| 177 | |
| 178 | Program* ProgramManager::loadProgram(uint64_t progId) |
| 179 | { |
| 180 | if (progId < ProgramType::BUILTIN_COUNT) |
| 181 | return getBuiltinProgram(static_cast<uint32_t>(progId)); |
| 182 | |
| 183 | auto it = _customRegistry.find(progId); |
| 184 | if (it != _customRegistry.end()) |
| 185 | return loadProgram(it->second.vsName, it->second.fsName, ProgramType::CUSTOM_PROGRAM, progId, it->second.vlt); |
| 186 | return nullptr; |
| 187 | } |
| 188 | |
| 189 | Program* ProgramManager::loadProgram(std::string_view vsName, std::string_view fsName, VertexLayoutType vlt) |
| 190 | { |