Skip to content

Commit 5654bfa

Browse files
committed
Fix: set texture sampling to POINT in noSmooth() for OpenGL #951
1 parent 735bfa6 commit 5654bfa

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

core/src/processing/opengl/PGraphicsOpenGL.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3274,30 +3274,29 @@ public void smooth(int level) {
32743274
}
32753275
}
32763276
3277-
3277+
*/
32783278
@Override
32793279
public void noSmooth() {
32803280
if (smoothDisabled) return;
32813281

3282-
smooth = false;
3282+
smooth = 0;
32833283
textureSampling = Texture.POINT;
32843284

3285-
if (1 < quality) {
3285+
restartPGL();
3286+
if (0 < smooth) {
32863287
smoothCallCount++;
32873288
if (parent.frameCount - lastSmoothCall < 30 && 5 < smoothCallCount) {
32883289
smoothDisabled = true;
32893290
PGraphics.showWarning(TOO_MANY_SMOOTH_CALLS_ERROR);
32903291
}
32913292
lastSmoothCall = parent.frameCount;
32923293

3293-
quality = 0;
3294+
smooth = 0;
3295+
32943296

3295-
// This will trigger a surface restart next time
3296-
// requestDraw() is called.
3297-
restartPGL();
32983297
}
32993298
}
3300-
*/
3299+
33013300

33023301

33033302
//////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)