Skip to content

Commit a8d33af

Browse files
fix opacity by swapping logic
1 parent 07f3a00 commit a8d33af

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/tools/partview.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static void render()
9999
//cout << "not inited" << endl;
100100
inited=true;
101101
colorMissing = false;
102-
colorMissing = false;
102+
alphaMissing = false;
103103

104104

105105
glEnable(GL_DEPTH_TEST);
@@ -149,12 +149,12 @@ static void render()
149149
!particles->attributeInfo("alphaPP", alphaAttr) &
150150
!particles->attributeInfo("pointOpacity", alphaAttr))
151151
{
152+
glDisable(GL_BLEND);
153+
alphaMissing = true;
154+
} else {
152155
glEnable(GL_BLEND);
153156
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
154157
alphaMissing = false;
155-
} else {
156-
glDisable(GL_BLEND);
157-
alphaMissing = true;
158158
}
159159
}
160160
}

0 commit comments

Comments
 (0)