processing/processing — pull request #2157 by allesblinkt (2013-10-20 13:05:06+00:00)
Title: Using sketchQuality() does not work properly with P3D, OPENGL, P2D

This modification fixes the situation that using `sketchQuality()` does not work properly with the PGraphicsOpenGl based renderers. Because smooth() is called on initialization if the quality is > 2, which is fine for the 2D software renderers (only the `smooth` flag is set to true), but the current `smooth()` implementation in PGraphicsOpenGl would actually always call `smooth(2)`, thus degrading the set quality.

Here is a little sketch to replicate the bug:

```java
int sketchWidth() { return 200; }
int sketchHeight() { return 200; }
int sketchQuality() { return 8; }
String sketchRenderer() { return P3D; }

void setup() {
}

void draw() {
background(50);

text("Set quality: " + sketchQuality(), 20, 20);
text("Actual quality: " + g.quality, 20, 35);

stroke(255);
fill(255, 69, 0);
ellipse(width * 0.5, height * 0.5, 40, 50);

line(0, 0, 100, 200);
}
```