正方形
Наследование: IBufferable
Пример #1
0
 public static GroundRenderer Create(GroundModel model)
 {
     var shaderCodes = new ShaderCode[2];
     shaderCodes[0] = new ShaderCode(File.ReadAllText(@"shaders\Ground.vert"), ShaderType.VertexShader);
     shaderCodes[1] = new ShaderCode(File.ReadAllText(@"shaders\Ground.frag"), ShaderType.FragmentShader);
     var map = new AttributeMap();
     map.Add("in_Position", GroundModel.strPosition);
     var renderer = new GroundRenderer(model, shaderCodes, map);
     return renderer;
 }
Пример #2
0
        public static GroundRenderer Create(GroundModel model)
        {
            var shaderCodes = new ShaderCode[2];

            shaderCodes[0] = new ShaderCode(File.ReadAllText(@"shaders\Ground.vert"), ShaderType.VertexShader);
            shaderCodes[1] = new ShaderCode(File.ReadAllText(@"shaders\Ground.frag"), ShaderType.FragmentShader);
            var map = new PropertyNameMap();

            map.Add("in_Position", GroundModel.strPosition);
            var ground = new GroundRenderer(model, shaderCodes, map);

            return(ground);
        }
Пример #3
0
        public static GroundRenderer Create(GroundModel model)
        {
            var shaderCodes = new ShaderCode[2];

            shaderCodes[0] = new ShaderCode(File.ReadAllText(@"shaders\Ground.vert"), ShaderType.VertexShader);
            shaderCodes[1] = new ShaderCode(File.ReadAllText(@"shaders\Ground.frag"), ShaderType.FragmentShader);
            var provider = new ShaderCodeArray(shaderCodes);
            var map      = new AttributeMap();

            map.Add("in_Position", GroundModel.strPosition);
            var renderer = new GroundRenderer(model, provider, map);

            return(renderer);
        }