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

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

            _resourceManager.Insert(name, shader);

            return shader;
        }