diff --git a/src/common/gl/program.cpp b/src/common/gl/program.cpp index c6e99c71c..7ad266f51 100644 --- a/src/common/gl/program.cpp +++ b/src/common/gl/program.cpp @@ -192,6 +192,18 @@ void Program::BindFragData(GLuint index /*= 0*/, const char* name /*= "o_col0"*/ void Program::BindFragDataIndexed(GLuint color_number /*= 0*/, const char* name /*= "o_col0"*/) { + if (GLAD_GL_VERSION_3_3 || GLAD_GL_ARB_blend_func_extended) + { + glBindFragDataLocationIndexed(m_program_id, color_number, 0, name); + return; + } + else if (GLAD_GL_EXT_blend_func_extended) + { + glBindFragDataLocationIndexedEXT(m_program_id, color_number, 0, name); + return; + } + + Log_ErrorPrintf("BindFragDataIndexed() called without ARB or EXT extension, we'll probably crash."); glBindFragDataLocationIndexed(m_program_id, color_number, 0, name); }