A program that runs on the [[GPU]], composed of one or more [[Shader|Shaders]] linked together.
>[!example] Linking a program with [[OpenGL]]
>```cpp
>u32 link_shaders(const std::span<u32> shaders) {
> u32 program = glCreateProgram();
> for (const auto& shader : shaders) {
> glAttachShader(program, shader);)
> }
> glLinkProgram(progam);
>
> for (const auto& shader : shaders) {
> glDeleteShader(shader);
> }
>
> i32 success = 0;
> glGetProgramiv(program, GL_COMPILE_STATUS, &success);
>
> if (not program) {
> char info_log[512];
> glGetProgramInfoLog(program, sizeof(info_log), 0, info_log);
> std::cerr << "Failed to Link Program: " << info_log << std::endl;
> return 0;
> }
>
> return program;
>}
>```