CC: Fix blend function, it's different for cc enabled
This commit is contained in:
parent
2dcf424d63
commit
b17071555d
1 changed files with 6 additions and 5 deletions
|
@ -1247,15 +1247,16 @@ void SceneOpenGL2Window::prepareStates(TextureType type, qreal opacity, qreal br
|
|||
opaque = false;
|
||||
if (!opaque) {
|
||||
glEnable(GL_BLEND);
|
||||
// if (!options->isColorCorrected()) {
|
||||
if (options->isColorCorrected()) {
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
} else {
|
||||
if (alpha) {
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
||||
} else {
|
||||
glBlendColor((float)opacity, (float)opacity, (float)opacity, (float)opacity);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA);
|
||||
glBlendFunc(GL_ONE, GL_ONE_MINUS_CONSTANT_ALPHA);
|
||||
}
|
||||
// } else
|
||||
// glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
}
|
||||
|
||||
const qreal rgb = brightness * opacity;
|
||||
|
|
Loading…
Reference in a new issue