DISABLE_OPTIMIZED_STROKE hint only works in 3D

This commit is contained in:
codeanticode
2013-04-10 18:37:27 -04:00
parent 07a7ad30a1
commit 902fbeaae8
@@ -1939,8 +1939,12 @@ public class PGraphicsOpenGL extends PGraphics {
flush();
setFlushMode(FLUSH_WHEN_FULL);
} else if (which == DISABLE_OPTIMIZED_STROKE) {
flush();
setFlushMode(FLUSH_CONTINUOUSLY);
if (is2D()) {
PGraphics.showWarning("Optimized strokes can only be disabled in 3D");
} else {
flush();
setFlushMode(FLUSH_CONTINUOUSLY);
}
} else if (which == DISABLE_STROKE_PERSPECTIVE) {
if (0 < tessGeo.lineVertexCount && 0 < tessGeo.lineIndexCount) {
// We flush the geometry using the previous line setting.