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 CreateShaderFromSource(ShaderType type, string name, string source)
        {
            Shader shader = new Shader(type, "");

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

            _resourceManager.Insert(name, shader);

            return shader;
        }