doesn't apply perspective correction when the projection matrix is orthographic, fixes issue 1207.

This commit is contained in:
codeanticode
2012-09-05 22:41:26 +00:00
parent 8595a41533
commit e67f0d653d
2 changed files with 8 additions and 4 deletions
@@ -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);