AddDefaultShaders adds to this shader manager all default include chunks, shaders and programs statically registered.
()
| 76 | // AddDefaultShaders adds to this shader manager all default |
| 77 | // include chunks, shaders and programs statically registered. |
| 78 | func (sm *Shaman) AddDefaultShaders() error { |
| 79 | |
| 80 | for _, name := range shaders.Includes() { |
| 81 | sm.AddChunk(name, shaders.IncludeSource(name)) |
| 82 | } |
| 83 | |
| 84 | for _, name := range shaders.Shaders() { |
| 85 | sm.AddShader(name, shaders.ShaderSource(name)) |
| 86 | } |
| 87 | |
| 88 | for _, name := range shaders.Programs() { |
| 89 | sm.proginfo[name] = shaders.GetProgramInfo(name) |
| 90 | } |
| 91 | return nil |
| 92 | } |
| 93 | |
| 94 | // AddChunk adds a shader chunk with the specified name and source code |
| 95 | func (sm *Shaman) AddChunk(name, source string) { |
no test coverage detected