Пример #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;
        }
Пример #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);
        }
Пример #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;
        }
Пример #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);
        }