MCPcopy
hub / github.com/g3n/engine / AddDefaultShaders

Method AddDefaultShaders

renderer/shaman.go:78–92  ·  view source on GitHub ↗

AddDefaultShaders adds to this shader manager all default include chunks, shaders and programs statically registered.

()

Source from the content-addressed store, hash-verified

76// AddDefaultShaders adds to this shader manager all default
77// include chunks, shaders and programs statically registered.
78func (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
95func (sm *Shaman) AddChunk(name, source string) {

Callers 2

AppFunction · 0.80
AppFunction · 0.80

Calls 8

AddChunkMethod · 0.95
AddShaderMethod · 0.95
IncludesFunction · 0.92
IncludeSourceFunction · 0.92
ShadersFunction · 0.92
ShaderSourceFunction · 0.92
ProgramsFunction · 0.92
GetProgramInfoFunction · 0.92

Tested by

no test coverage detected