Reverse swap red&blue logic

This commit is contained in:
Timo R
2014-07-10 14:35:03 +02:00
parent 6e4a79a640
commit f7b1bfa0a8
+3 -3
View File
@@ -308,9 +308,9 @@ void XCompcapMain::updateSettings(obs_data_t settings)
uint8_t *texData = new uint8_t[width() * height() * 4];
for (unsigned int i = 0; i < width() * height() * 4; i += 4) {
texData[i + 0] = p->swapRedBlue ? 0xFF : 0;
texData[i + 0] = p->swapRedBlue ? 0 : 0xFF;
texData[i + 1] = 0;
texData[i + 2] = p->swapRedBlue ? 0 : 0xFF;
texData[i + 2] = p->swapRedBlue ? 0xFF : 0;
texData[i + 3] = 0xFF;
}
@@ -321,7 +321,7 @@ void XCompcapMain::updateSettings(obs_data_t settings)
delete[] texData;
if (!p->swapRedBlue) {
if (p->swapRedBlue) {
GLuint tex = *(GLuint*)texture_getobj(p->tex);
glBindTexture(GL_TEXTURE_2D, tex);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_B, GL_RED);