From 08f26f7071f67a884d16c9477d9f3a46579164ca Mon Sep 17 00:00:00 2001 From: benfry Date: Sat, 21 Feb 2009 19:20:36 +0000 Subject: [PATCH] blend() y coordinates inverted when using OpenGL (bug #1137) --- core/todo.txt | 8 ++-- .../processing/opengl/PGraphicsOpenGL.java | 38 ++++++++++--------- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/core/todo.txt b/core/todo.txt index a038e9f21..a14e18f10 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -29,10 +29,10 @@ X Fix algorithm for quadratic to cubic curve conversion X wrong algorithm in PGraphicsOpenGL and PShapeSVG X (thanks to user 'shambles') X http://dev.processing.org/bugs/show_bug.cgi?id=1122 -_ tint() not working in P2D -_ http://dev.processing.org/bugs/show_bug.cgi?id=1132 -_ blend() y coordinates inverted when using OpenGL -_ http://dev.processing.org/bugs/show_bug.cgi?id=1137 +X tint() not working in P2D +X http://dev.processing.org/bugs/show_bug.cgi?id=1132 +X blend() y coordinates inverted when using OpenGL +X http://dev.processing.org/bugs/show_bug.cgi?id=1137 invalid/wontfix/dupe X Processing will not start with non-standard disk partitioning on OS X diff --git a/opengl/src/processing/opengl/PGraphicsOpenGL.java b/opengl/src/processing/opengl/PGraphicsOpenGL.java index 1d48895e9..22686886a 100644 --- a/opengl/src/processing/opengl/PGraphicsOpenGL.java +++ b/opengl/src/processing/opengl/PGraphicsOpenGL.java @@ -2973,12 +2973,16 @@ public class PGraphicsOpenGL extends PGraphics3D { //static public int blendColor(int c1, int c2, int mode) - public void blend(PImage src, - int sx, int sy, int dx, int dy, int mode) { - set(dx, dy, PImage.blendColor(src.get(sx, sy), get(dx, dy), mode)); - } + // this function was removed +// public void blend(PImage src, +// int sx, int sy, int dx, int dy, int mode) { +// set(dx, dy, PImage.blendColor(src.get(sx, sy), get(dx, dy), mode)); +// } + // the following two were removed for 1.0.2 because loadPixels and + // updatePixels are now called in the superclass. + // http://dev.processing.org/bugs/show_bug.cgi?id=1137 /** * Extremely slow and not optimized, should use GL methods instead. * Currently calls a beginPixels() on the whole canvas, then does the copy, @@ -2986,21 +2990,21 @@ public class PGraphicsOpenGL extends PGraphics3D { * Bug 941, * Bug 942. */ - public void blend(int sx1, int sy1, int sx2, int sy2, - int dx1, int dy1, int dx2, int dy2, int mode) { - loadPixels(); - super.blend(sx1, sy1, sx2, sy2, dx1, dy1, dx2, dy2, mode); - updatePixels(); - } +// public void blend(int sx1, int sy1, int sx2, int sy2, +// int dx1, int dy1, int dx2, int dy2, int mode) { +// loadPixels(); +// super.blend(sx1, sy1, sx2, sy2, dx1, dy1, dx2, dy2, mode); +// updatePixels(); +// } - public void blend(PImage src, - int sx1, int sy1, int sx2, int sy2, - int dx1, int dy1, int dx2, int dy2, int mode) { - loadPixels(); - super.blend(src, sx1, sy1, sx2, sy2, dx1, dy1, dx2, dy2, mode); - updatePixels(); - } +// public void blend(PImage src, +// int sx1, int sy1, int sx2, int sy2, +// int dx1, int dy1, int dx2, int dy2, int mode) { +// loadPixels(); +// super.blend(src, sx1, sy1, sx2, sy2, dx1, dy1, dx2, dy2, mode); +// updatePixels(); +// }