diff --git a/src/common/gl_program.cpp b/src/common/gl_program.cpp index 480310584..1bae3c841 100644 --- a/src/common/gl_program.cpp +++ b/src/common/gl_program.cpp @@ -105,6 +105,11 @@ void Program::BindFragData(GLuint index /*= 0*/, const char* name /*= "o_col0"*/ glBindFragDataLocation(m_program_id, index, name); } +void Program::BindFragDataIndexed(GLuint color_number /*= 0*/, const char* name /*= "o_col0"*/) +{ + glBindFragDataLocationIndexed(m_program_id, color_number, 0, name); +} + bool Program::Link() { glLinkProgram(m_program_id); diff --git a/src/common/gl_program.h b/src/common/gl_program.h index fdf628375..de2bf5362 100644 --- a/src/common/gl_program.h +++ b/src/common/gl_program.h @@ -21,6 +21,7 @@ public: void BindDefaultAttributes(); void BindFragData(GLuint index = 0, const char* name = "o_col0"); + void BindFragDataIndexed(GLuint color_number = 0, const char* name = "o_col0"); bool Link();