From 325064318adff39524abb6dabdaf93ab2b5bdfa0 Mon Sep 17 00:00:00 2001 From: benfry Date: Tue, 1 Mar 2005 19:36:12 +0000 Subject: [PATCH] last changes while preparing release 77 --- processing/build/macosx/dist.sh | 6 +- processing/build/shared/revisions.txt | 84 +++++++++++++++++++++++---- processing/core/PConstants.java | 12 ++-- processing/core/PGraphics2.java | 3 +- processing/core/PImage.java | 21 +++++-- processing/core/PTriangle.java | 12 ++-- processing/core/todo.txt | 56 ++++++++++-------- processing/todo.txt | 2 + 8 files changed, 141 insertions(+), 55 deletions(-) diff --git a/processing/build/macosx/dist.sh b/processing/build/macosx/dist.sh index 465aabd65..9ae926bcb 100755 --- a/processing/build/macosx/dist.sh +++ b/processing/build/macosx/dist.sh @@ -102,7 +102,11 @@ find processing -name "*~" -exec rm -f {} ';' find processing -name "._*" -exec rm -f {} ';' find processing -name "CVS" -exec rm -rf {} ';' -stuff -f sitx processing-$REVISION +mv processing/Processing.app "processing/Processing $SHORT_REVISION.app" +mv processing processing-$REVISION + +# don't have deluxe on my laptop right now +#stuff -f sitx processing-$REVISION # zip it all up for release #NICE_FOLDER="Processing $SHORT_REVISION" diff --git a/processing/build/shared/revisions.txt b/processing/build/shared/revisions.txt index b90947cf1..ae1aff82f 100644 --- a/processing/build/shared/revisions.txt +++ b/processing/build/shared/revisions.txt @@ -51,13 +51,14 @@ changes/important notes: PGraphics2 2D rendering for systems using Java 1.3+ this is used dynamically whenever the applet detects - that it is running on a Java 1.3+ system. + that it is running on a Java 1.3+ system. it is an entirely new, and *complete* renderer based on Java2D. this was a shortcut to get a renderer that worked properly on the vast majority of machines in our target audience (courses, beginners, developers) until i have time to complete the 1.1 renderer (so - that exporting to the web works again). + that exporting to the web works again). basically, + i've sold out, in hope of ever reaching 1.0. PGraphics3 3D rendering in Java 1.1 this is loaded when the depth() command is executed @@ -67,9 +68,12 @@ changes/important notes: renderer, although it's using sumea sami's newer triangle rendering, meaning that things are much faster than before (although textures are a little - fuggly). smooth() and noSmooth() will not be - supported in this mode. for smoothing, use the OpenGL - renderer. + fuggly). there are no plans to support smooth() in + this mode. for smoothing, use the OpenGL renderer. + stroke caps/joins will also probably not work in this + mode (lines are 2D objects, how do you put a stroke + on a 3D object?), but that hasn't yet been fully + determined. PGraphicsGL OpenGL renderer for use in Java 1.3+ jogl requires java 1.3, and this rendering option can @@ -86,7 +90,30 @@ changes/important notes: which will echo all rendering calls to that class until the end of the frame. this handles writing to files, we won't be supporting plug-in - visual renderers in Processing 1.0. + visual renderers in Processing 1.0 (unless you want + to use this to open up a separate window or something + weird like that) + + if you're curious, or filing a bug report, you can always check what + the current rendering engine is by using: println(g.getClass()); + +- very exciting: strokeWeight(), strokeCap(), strokeJoin() et al + now work when using 2D and using Java 1.3 or higher. these will + eventually work in Java 1.1 for 2D as well. + +- the new renderers may change the speed of some things significantly. + for instance, using text on java 1.3 when depth() hasn't been called + (PGraphics2) may be far slower than before. or using images in the same + situation may require much more RAM. on the other hand, smoothed shapes + and general drawing in the same situation might be much faster. + +- i'm trying to think of a means to switch between the java 1.3 version + of the 2D api and the 1.1 version in case people want to force use of + the old one (once it's working again). we'll see. + +- presumably the separation of the rendering engines also means that + one could post a web applet that doesn't include the 3D rendering + code if your applet is only 2D (or vice versa). - pmouseX and pmouseY have returned and are better than ever. @@ -133,7 +160,8 @@ changes/important notes: ide fun - forgot to mention in rev 75 that double-clicking a .pde file on the -mac will now launch processing with that sketch running + mac will now launch processing with that sketch. someday windows will + do this too. someday... - i've replaced the cvs version of jikes that we'd been using with jikes 1.22, a real release, and the very latest. it's only 2 or 3MB @@ -143,7 +171,30 @@ mac will now launch processing with that sketch running essential for p5). -bugs +serial library + +- serialEvents are now fired after each byte has been received. + +- added buffer(int count) method to Serial to set the number of + bytes to receive before firing a serialEvent. + +- added bufferUntil(int whatByte) method to Serial that will buffer + until that byte has been received and then call serialEvent(). + +- these changes were simple code but haven't been tested, so they + may be prone to errors. let me know. + +- just one function (prompt() which will bring up a list of serial + ports in a nice window) remains to finish the Serial library, + everything else is considered complete (barring a revolt by the + itp physical computing guys). + + +known bugs + +- the examples have not been updated. they're getting pretty crufty, + but i've been making such a mess of the api that i've made casey + hold off until things settle down a bit before updating. - curveVertex() is temporarily broken in this release. @@ -151,19 +202,32 @@ bugs that don't have the java plug-in installed. this includes 60% of Windows users on the web, and anyone using Mac OS 8 or 9. the applet will export, but will turn up mostly blank on machines with Java 1.1. + to publish things to the web, you might want to use an earlier + release, or force people to upgrade their java vm somehow. - windows coming up at the wrong size or with the wrong placement: make sure you're using size(nnn, nnn) where nnn are actual numbers. if you're doing that and still seeing trouble, please report how to reproduce. -- "Using ATI workaround..." error message isn't really an error, it's - just something that jogl spits out. fret not. +- on macosx (maybe windows too?) applets sometimes come up with their + top 20 pixels or so missing. working on a fix. + +- when using opengl, the "Using ATI workaround..." error message isn't + really an error, it's just something that jogl spits out. fret not. + same with that "can't get focus" error that often shows up on the + mac. i don't think there's anything i can do about either. - lighting is fuggly. i have a feeling that normals aren't being set up properly, partly because that code has gotten no love for a long time and everything around it has changed. +- several reported ide bugs with "save as", "hide" and others remain. + i hope to fix these in the next release. + +- tint() does not work properly in depth() mode and using the + processing renderer (PGraphics3). + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . diff --git a/processing/core/PConstants.java b/processing/core/PConstants.java index e0ca62f84..156a4d849 100644 --- a/processing/core/PConstants.java +++ b/processing/core/PConstants.java @@ -83,12 +83,12 @@ public interface PConstants { // filter/convert types - static final int BLACK_WHITE = 0; - static final int GRAYSCALE = 1; - static final int BLUR = 2; - static final int GAUSSIAN_BLUR = 3; - static final int POSTERIZE = 4; - static final int FIND_EDGES = 5; + static final int BLACK_WHITE = 10; + static final int GRAYSCALE = 11; + static final int BLUR = 12; + static final int GAUSSIAN_BLUR = 13; + static final int POSTERIZE = 14; + static final int FIND_EDGES = 15; // blend mode keyword definitions diff --git a/processing/core/PGraphics2.java b/processing/core/PGraphics2.java index ebd31731a..703955ccf 100644 --- a/processing/core/PGraphics2.java +++ b/processing/core/PGraphics2.java @@ -556,7 +556,8 @@ public class PGraphics2 extends PGraphics { ImageCache cash = (ImageCache) who.cache; // if image previously was tinted, or the color changed // or the image was tinted, and tint is now disabled - if ((tint && (!cash.tinted || (cash.tintedColor != tintColor))) || + if ((tint && !cash.tinted) || + (tint && (cash.tintedColor != tintColor)) || (!tint && cash.tinted)) { // for tint change, mark all pixels as needing update who.updatePixels(); diff --git a/processing/core/PImage.java b/processing/core/PImage.java index 3722adcb0..4927164e9 100644 --- a/processing/core/PImage.java +++ b/processing/core/PImage.java @@ -488,16 +488,25 @@ public class PImage implements PConstants, Cloneable { /** * Options to filter an image in place. + * RGB set all the high bits in the image to opaque + * and sets the format to RGB + * FIND_EDGES (no params) .. high pass filter + * BLUR (no params) + * GAUSSIAN_BLUR (one param) + * BLACK_WHITE? (param for midpoint) + * GRAYSCALE + * POSTERIZE (int num of levels) */ - // FIND_EDGES (no params) .. high pass filter - // BLUR (no params) - // GAUSSIAN_BLUR (one param) - // BLACK_WHITE? (param for midpoint) - // GRAYSCALE - // POSTERIZE (int num of levels) public void filter(int kind) { switch (kind) { + case RGB: + for (int i = 0; i < pixels.length; i++) { + pixels[i] |= 0xff000000; + } + format = RGB; + break; + case BLACK_WHITE: filter(BLACK_WHITE, 0.5f); break; diff --git a/processing/core/PTriangle.java b/processing/core/PTriangle.java index eaeeec4f5..f36de3e7f 100644 --- a/processing/core/PTriangle.java +++ b/processing/core/PTriangle.java @@ -64,14 +64,14 @@ public class PTriangle implements PConstants private float[] z_array; // U,V coordinates - private float[] u_array; - private float[] v_array; + private float[] u_array; + private float[] v_array; // Vertex Intensity - private float[] r_array; - private float[] g_array; - private float[] b_array; - private float[] a_array; + private float[] r_array; + private float[] g_array; + private float[] b_array; + private float[] a_array; // vertex offsets private int o0; diff --git a/processing/core/todo.txt b/processing/core/todo.txt index 80b61a10c..2adc9b05b 100644 --- a/processing/core/todo.txt +++ b/processing/core/todo.txt @@ -10,6 +10,18 @@ X only allocate stencil and zbuffer on first call to depth() X this will require changes to PTriangle and PLine inside their loops X try running javadoc X die() may need to throw a RuntimeException +o call filter() to convert RGB/RGBA/ALPHA/GRAY +o cuz the cache is gonna be bad going rgb to rgba +X don't bother, people can re-create the image or set cache null +X fix font coloring in PGraphics2 +X fix tint() for PGraphics2 +X get text working again +X partially the problem is with ALPHA images +X how should they be stored internally +X also colored text, requires tint() to work properly +X move textMode and textSpace back out of PFont +X use die() to fail in font situations +X can't, just use a RuntimeException covered in previous X before graphics engine change, attach jogl stuff @@ -40,6 +52,8 @@ X add gzipInput and gzipOutput X light(x, y, z, c1, c2, c3, TYPE) X also BLight with same constructor, and on() and off() fxn X make sure applet is stopping in draw mode +X loadImage() is broken on some machines +X hacked for a fix in 72, but need to better coordinate with openStream() api changes X removed circle.. it's dumb when ellipse() is in there @@ -111,31 +125,24 @@ X set initial size using --size= X color channels seem to be swapped on windows in image example X check on the mac to see what it looks like -_ call filter() to convert RGB/RGBA/ALPHA/GRAY -_ cuz the cache is gonna be bad going rgb to rgba - -X fix font coloring in PGraphics2 -_ fix tint() for PGraphics2 -_ fix tint() for PGraphics3 (what could be wrong?) -_ maybe not setting fill color when drawing images? - -_ get text working again -X partially the problem is with ALPHA images -X how should they be stored internally -X also colored text, requires tint() to work properly -X move textMode and textSpace back out of PFont -X use die() to fail in font situations -X can't, just use a RuntimeException - -_ default to single byte input from serial port -_ and add serial.setBuffer() for message length as alternative -_ or serial.setDelimiter() to fire message on delim +X default to single byte input from serial port +X and add serial.setBuffer() for message length as alternative +X or serial.setDelimiter() to fire message on delim +X named it bufferUntil(); // +0078 or later + +- applets on osx sometimes show up 20 pixels off the top + _ implement PGraphics2.curveVertex() +_ fix tint() for PGraphics3 (what could be wrong?) +_ maybe not setting fill color when drawing textures +_ guessing it's an implementation issue in sami's renderer + _ make Graphics2 et al load dynamically using reflection _ can this be done with g2 and if exception just falls back to g1? _ this way people can remove g1 by hand @@ -146,8 +153,11 @@ _ look at curve functions more closely _ should we switch to curveVertex(1,2,3) (ala curveto) _ because some confusion with mixing types of curves _ how to force PGraphics() instead of PGraphics2() +_ write filter() functions +_ remove SCREEN_SPACE altogether? _ also have a simple way to hook in triangle leeches to PGraphics3 +_ this exists, but needs to be documented, or have accessors _ get PGraphics.java engine working again @@ -156,9 +166,9 @@ _ lighting totally sucks (both PGraphics3 and PGraphicsGL) _ bring in materials for opengl as well? _ don't include a class, just make it similar to the light functions -_ remove SCREEN_SPACE altogether? - _ be consistent about getXxx() methods +_ or just what functions are actually made public +_ is fillRi needed? it's pretty goofy.. _ beginShape() _ don't allow you to draw stroked items unless stroke() is called @@ -179,8 +189,6 @@ _ http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs _ image(String name) and textFont(String name) _ do we change to font(arial, 12) ? -_ loadImage() is broken on some machines -_ hacked for a fix in 72, but need to better coordinate with openStream() _ 404 error because first searches applet directory on zipdecode _ how to handle full screen (opengl especially) or no screen (for scripts) @@ -198,8 +206,6 @@ _ since needs to render to screen as well // -0078 - _ when running externally, applets don't always get placed properly _ if size is never set, then doesn't always layout _ problem is in gl and in core, and is inconsistent diff --git a/processing/todo.txt b/processing/todo.txt index c639298c0..28e9f7ac0 100644 --- a/processing/todo.txt +++ b/processing/todo.txt @@ -17,6 +17,8 @@ X updated windows icon X make macosx use kUserDomain to grab Documents folder X this is just-in-case, who knows what they're up to over in cupertino +// + create a new sketch create a new tab named "a" create a new tab named "a_2"