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; }
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); }
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); }