Shark.cpp
branchv_0
changeset 34 8cf3812a92eb
parent 31 22827574296e
equal deleted inserted replaced
33:3aae6275b683 34:8cf3812a92eb
   639 	shaderProgram = std::make_shared<Program>();
   639 	shaderProgram = std::make_shared<Program>();
   640 
   640 
   641 	// glBindFragDataLocation(program, 0, "outColor");
   641 	// glBindFragDataLocation(program, 0, "outColor");
   642 	// glBindAttribLocation(program, LOC.input, "vertices");
   642 	// glBindAttribLocation(program, LOC.input, "vertices");
   643 
   643 
   644 	for (const Configuration::Shader definition : cfg.shaders) {
   644 	for (const Configuration::Shader& definition : cfg.shaders) {
   645 		Shader::Type type;
   645 		Shader::Type type;
   646 		std::string fileName = definition.fileName;
   646 		std::string fileName = definition.fileName;
   647 		if (definition.type == "fragment") type = Shader::Type::FRAGMENT;
   647 		if (definition.type == "fragment") type = Shader::Type::FRAGMENT;
   648 		else if (definition.type == "vertex") type = Shader::Type::VERTEX;
   648 		else if (definition.type == "vertex") type = Shader::Type::VERTEX;
   649 		else throw std::invalid_argument("unsupported shader type");
   649 		else throw std::invalid_argument("unsupported shader type");