17 #ifndef GZ_MSGS_CONVERT_SHADERTYPE_HH_
18 #define GZ_MSGS_CONVERT_SHADERTYPE_HH_
21 #include "gz/msgs/material.pb.h"
28 inline namespace GZ_MSGS_VERSION_NAMESPACE {
33 auto result = msgs::Material::VERTEX;
36 result = msgs::Material::VERTEX;
38 else if (_str ==
"pixel")
40 result = msgs::Material::PIXEL;
42 else if (_str ==
"normal_map_object_space")
44 result = msgs::Material::NORMAL_MAP_OBJECT_SPACE;
46 else if (_str ==
"normal_map_tangent_space")
48 result = msgs::Material::NORMAL_MAP_TANGENT_SPACE;
52 std::cerr <<
"Unrecognized Material::ShaderType ["
54 <<
"], returning msgs::Material::VERTEX"
66 case msgs::Material::VERTEX:
71 case msgs::Material::PIXEL:
76 case msgs::Material::NORMAL_MAP_OBJECT_SPACE:
78 result =
"normal_map_object_space";
81 case msgs::Material::NORMAL_MAP_TANGENT_SPACE:
83 result =
"normal_map_tangent_space";
89 std::cerr <<
"Unrecognized Material::ShaderType ["
91 <<
"], returning 'unknown'"