mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
Reverse swap red&blue logic
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user