------------------------------------------------------------------------------------------------ Convert a Q3 shader blend function to the appropriate enum value
| 84 | // ------------------------------------------------------------------------------------------------ |
| 85 | // Convert a Q3 shader blend function to the appropriate enum value |
| 86 | Q3Shader::BlendFunc StringToBlendFunc(const std::string &m) { |
| 87 | if (m == "GL_ONE") { |
| 88 | return Q3Shader::BLEND_GL_ONE; |
| 89 | } |
| 90 | if (m == "GL_ZERO") { |
| 91 | return Q3Shader::BLEND_GL_ZERO; |
| 92 | } |
| 93 | if (m == "GL_SRC_ALPHA") { |
| 94 | return Q3Shader::BLEND_GL_SRC_ALPHA; |
| 95 | } |
| 96 | if (m == "GL_ONE_MINUS_SRC_ALPHA") { |
| 97 | return Q3Shader::BLEND_GL_ONE_MINUS_SRC_ALPHA; |
| 98 | } |
| 99 | if (m == "GL_ONE_MINUS_DST_COLOR") { |
| 100 | return Q3Shader::BLEND_GL_ONE_MINUS_DST_COLOR; |
| 101 | } |
| 102 | ASSIMP_LOG_ERROR("Q3Shader: Unknown blend function: ", m); |
| 103 | return Q3Shader::BLEND_NONE; |
| 104 | } |
| 105 | |
| 106 | // ------------------------------------------------------------------------------------------------ |
| 107 | // Load a Quake 3 shader |