Example #1
0
        private Shader CreateShaderFromFile(ShaderType type, string name, string filename)
        {
            Shader shader = new Shader(type, filename);

            shader.Source = File.ReadAllText(filename);
            shader.Compile();
            
            ResourceManager.Insert(name, shader);

            return shader;
        }
Example #2
0
        private Shader CreateShaderFromFile(ShaderType type, string name, string filename)
        {
            Shader shader = new Shader(type, filename);

            shader.Source = File.ReadAllText(filename);
            shader.Compile();

            ResourceManager.Insert(name, shader);

            return(shader);
        }
Example #3
0
        private Shader CreateShaderFromSource(ShaderType type, string name, string source)
        {
            Shader shader = new Shader(type, "");

            shader.Source = source;
            shader.Compile();

            ResourceManager.Insert(name, shader);

            return shader;
        }
Example #4
0
        private Shader CreateShaderFromSource(ShaderType type, string name, string source)
        {
            Shader shader = new Shader(type, "");

            shader.Source = source;
            shader.Compile();

            ResourceManager.Insert(name, shader);

            return(shader);
        }