MCPcopy Create free account
hub / github.com/assimp/assimp / StringToBlendFunc

Function StringToBlendFunc

code/AssetLib/MD3/MD3Loader.cpp:86–104  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------ Convert a Q3 shader blend function to the appropriate enum value

Source from the content-addressed store, hash-verified

84// ------------------------------------------------------------------------------------------------
85// Convert a Q3 shader blend function to the appropriate enum value
86Q3Shader::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

Callers 1

LoadShaderMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected