mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 19:05:34 +01:00
Smaller displacement for lines (issue #1790)
This commit is contained in:
@@ -125,6 +125,10 @@ public class PGL {
|
||||
/** Minimum array size to use arrayCopy method(). **/
|
||||
protected static final int MIN_ARRAYCOPY_SIZE = 2;
|
||||
|
||||
/** Factor used to displace the stroke vertices towards the camera in
|
||||
* order to make sure the lines are always on top of the fill geometry **/
|
||||
protected static final float STROKE_DISPLACEMENT = 0.999f;
|
||||
|
||||
/** JOGL's windowing toolkit */
|
||||
// The two windowing toolkits available to use in JOGL:
|
||||
protected static final int AWT = 0; // http://jogamp.org/wiki/index.php/Using_JOGL_in_AWT_SWT_and_Swing
|
||||
|
||||
@@ -7149,10 +7149,11 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
if (pgCurrent.getHint(DISABLE_OPTIMIZED_STROKE)) {
|
||||
setUniformValue(scaleLoc, 1.0f, 1.0f, 1.0f);
|
||||
} else {
|
||||
float f = PGL.STROKE_DISPLACEMENT;
|
||||
if (orthoProjection()) {
|
||||
setUniformValue(scaleLoc, 1.0f, 1.0f, 0.99f);
|
||||
setUniformValue(scaleLoc, 1, 1, f);
|
||||
} else {
|
||||
setUniformValue(scaleLoc, 0.99f, 0.99f, 0.99f);
|
||||
setUniformValue(scaleLoc, f, f, f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user