mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
doesn't apply perspective correction when the projection matrix is orthographic, fixes issue 1207.
This commit is contained in:
@@ -7067,7 +7067,8 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
float h = pgCurrent.viewport[3];
|
||||
setUniformValue(viewportLoc, x, y, w, h);
|
||||
|
||||
if (pgCurrent.getHint(ENABLE_STROKE_PERSPECTIVE)) {
|
||||
if (pgCurrent.getHint(ENABLE_STROKE_PERSPECTIVE) &&
|
||||
!pgCurrent.usingOrthoProjection) {
|
||||
setUniformValue(perspectiveLoc, 1);
|
||||
} else {
|
||||
setUniformValue(perspectiveLoc, 0);
|
||||
@@ -7188,7 +7189,8 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
float h = pgCurrent.viewport[3];
|
||||
setUniformValue(viewportLoc, x, y, w, h);
|
||||
|
||||
if (pgCurrent.getHint(ENABLE_STROKE_PERSPECTIVE)) {
|
||||
if (pgCurrent.getHint(ENABLE_STROKE_PERSPECTIVE) &&
|
||||
!pgCurrent.usingOrthoProjection) {
|
||||
setUniformValue(perspectiveLoc, 1);
|
||||
} else {
|
||||
setUniformValue(perspectiveLoc, 0);
|
||||
|
||||
@@ -7067,7 +7067,8 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
float h = pgCurrent.viewport[3];
|
||||
setUniformValue(viewportLoc, x, y, w, h);
|
||||
|
||||
if (pgCurrent.getHint(ENABLE_STROKE_PERSPECTIVE)) {
|
||||
if (pgCurrent.getHint(ENABLE_STROKE_PERSPECTIVE) &&
|
||||
!pgCurrent.usingOrthoProjection) {
|
||||
setUniformValue(perspectiveLoc, 1);
|
||||
} else {
|
||||
setUniformValue(perspectiveLoc, 0);
|
||||
@@ -7188,7 +7189,8 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
float h = pgCurrent.viewport[3];
|
||||
setUniformValue(viewportLoc, x, y, w, h);
|
||||
|
||||
if (pgCurrent.getHint(ENABLE_STROKE_PERSPECTIVE)) {
|
||||
if (pgCurrent.getHint(ENABLE_STROKE_PERSPECTIVE) &&
|
||||
!pgCurrent.usingOrthoProjection) {
|
||||
setUniformValue(perspectiveLoc, 1);
|
||||
} else {
|
||||
setUniformValue(perspectiveLoc, 0);
|
||||
|
||||
Reference in New Issue
Block a user