mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Enabling accurate 2D mode in P2D by default, fixed flush in endDraw()
This commit is contained in:
@@ -24,4 +24,10 @@ package processing.opengl;
|
||||
|
||||
|
||||
public class PGraphics2D extends PGraphicsOpenGL {
|
||||
|
||||
public PGraphics2D() {
|
||||
super();
|
||||
hints[ENABLE_ACCURATE_2D] = true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1556,15 +1556,8 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
public void endDraw() {
|
||||
report("top endDraw()");
|
||||
|
||||
if (flushMode == FLUSH_WHEN_FULL) {
|
||||
// Flushing any remaining geometry.
|
||||
flush();
|
||||
|
||||
// TODO: Implement depth sorting (http://code.google.com/p/processing/issues/detail?id=51)
|
||||
//if (hints[ENABLE_DEPTH_SORT]) {
|
||||
// flush();
|
||||
//}
|
||||
}
|
||||
// Flushing any remaining geometry.
|
||||
flush();
|
||||
|
||||
if (!drawing) {
|
||||
showWarning("P3D: Cannot call endDraw() before beginDraw().");
|
||||
|
||||
Reference in New Issue
Block a user