From 9b6a59329ea252fad5e62fe4aeb51aaeb440bbad Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 19 Oct 2019 17:35:36 +1000 Subject: [PATCH] Common: Support dual-source blend in GL::Program --- src/common/gl_program.cpp | 5 +++++ src/common/gl_program.h | 1 + 2 files changed, 6 insertions(+) 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();