Enabling accurate 2D mode in P2D by default, fixed flush in endDraw()

This commit is contained in:
codeanticode
2012-05-03 20:47:32 +00:00
parent 85ab0b41cd
commit 074be1a978
2 changed files with 8 additions and 9 deletions
@@ -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().");