Esempio n. 1
0
        public void Add(ReloadableShader shader, string name)
        {
            if (shaderNames.ContainsKey(shader))
            {
                throw new ArgumentException($"Shader already known by name '{shaderNames[shader]}'.");
            }

            var shadersOfType = shaders[shader.Type];

            shadersOfType.Add(name, shader); // will throw if name already taken

            shaderNames.Add(shader, name);
        }
Esempio n. 2
0
 public RendererShaderBuilder With(ReloadableShader shader)
 {
     shaders.Add(shader);
     return(this);
 }
Esempio n. 3
0
 public void Add(IShaderReloader shader, string name)
 {
     Add(ReloadableShader.LoadFrom(shader), name);
 }