From 44aca364eb83fe69abd775b68dab3335cafc3871 Mon Sep 17 00:00:00 2001 From: benfry Date: Tue, 21 Jun 2011 03:04:26 +0000 Subject: [PATCH] fix opengl applets, other minor bugs, look into beginRecord() issues --- android/todo.txt | 4 +- core/src/processing/core/PApplet.java | 11 +-- core/src/processing/core/PGraphics.java | 14 ++-- core/todo.txt | 95 ++++++++++++++----------- todo.txt | 11 ++- 5 files changed, 68 insertions(+), 67 deletions(-) diff --git a/android/todo.txt b/android/todo.txt index ed29d4717..08eb772fb 100644 --- a/android/todo.txt +++ b/android/todo.txt @@ -8,6 +8,8 @@ A http://code.google.com/p/processing/issues/detail?id=235 A mirroring in A3D when background() not called within draw() A http://code.google.com/p/processing/issues/detail?id=624 X remove A2D and A3D constants +o colorMode() error +o http://code.google.com/p/processing/issues/detail?id=223 _ add INTERNET permissions to the android net examples @@ -244,8 +246,6 @@ P5 _ instead, create a new resized bitmap, and get rid of pixels[] P5 _ http://dev.processing.org/bugs/show_bug.cgi?id=1487 P5 _ should alpha PImage stuff use a non-4byte config? P5 _ http://dev.processing.org/bugs/show_bug.cgi?id=1490 -DL _ colorMode() error -DL _ http://code.google.com/p/processing/issues/detail?id=223 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 95fe71b01..1e6e97fa6 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -7637,9 +7637,9 @@ public class PApplet extends Applet recorder.dispose(); recorder = null; } - if (g.isRecording()) { - g.endRecord(); - } +// if (g.isRecording()) { +// g.endRecord(); +// } } @@ -10225,11 +10225,6 @@ public class PApplet extends Applet } - public boolean isRecording() { - return g.isRecording(); - } - - public void mergeShapes(boolean val) { if (recorder != null) recorder.mergeShapes(val); g.mergeShapes(val); diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index 22427d6cb..2c8b41c61 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -5945,15 +5945,15 @@ public class PGraphics extends PImage implements PConstants { } - public void endRecord() { // ignore - showMissingWarning("endRecord"); - } +// public void endRecord() { // ignore +// showMissingWarning("endRecord"); +// } - public boolean isRecording() { - showMissingWarning("isRecording"); - return false; - } +// public boolean isRecording() { +// showMissingWarning("isRecording"); +// return false; +// } public void mergeShapes(boolean val) { diff --git a/core/todo.txt b/core/todo.txt index 7ea2eeac0..7e96cf8ca 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -56,13 +56,6 @@ X http://code.google.com/p/processing/issues/detail?id=198 X how should quadVertex() be named? bezierVertex() quadraticVertex() X decision: quadraticVertex() to avoid confusion with quads X more efficient version of copy() added for 2D -X move to new XML library -X add XHTML parsing or any others? -X html parser? javax.swing.text.html.parser... has binary DTDs -X decision: it's someone else's job -X XMLElemnt.parse() or new XMLElement(xmldata)? -X same goes for PShape.. parse from a string? -X http://code.google.com/p/processing/issues/detail?id=277 X rounded rectangle method X http://code.google.com/p/processing/issues/detail?id=265 X clockwise from upper-left @@ -75,6 +68,17 @@ X add to the 'changes' document X saveBytes() error when writing to existing file X http://code.google.com/p/processing/issues/detail?id=667 +opengl applets +X implement new applet-opengl.html based on the latest jogl +o jogl demos, NEWT examples crash on osx http://jogamp.org/jogl-demos/www/ +o http://jogamp.org/jogl-demos/www/applettest-jnlp.html +X not sure why these do/don't work, but it's mostly working +X OpenGL Applets won't load with JRE 6 update 21 or higher +X need to make the final call on this and implement +X http://code.google.com/p/processing/issues/detail?id=429 +o why we can't do OpenGL applets that are self-signed (wiki?) +o http://www.cert.org/blogs/vuls/2008/06/signed_java_security_worse_tha.html + cleanup o if too many errors come through during setup, app will terminate o printStackTrace() throttles on osx and poops out @@ -258,13 +262,16 @@ X closed as LATER in the original bugs db o add getSketchSize() and getSketchRenderer() o these could simply have the defaults at the outset X added in the more recent revisions -o Writing XML files (clean up the API) -o http://dev.processing.org/bugs/show_bug.cgi?id=964 X Use getContextClassLoader() instead of Class.forName() X http://dev.processing.org/bugs/show_bug.cgi?id=514 X cursor functions don't work in present mode X just add a note to the reference X http://code.google.com/p/processing/issues/detail?id=160 +o when drawing an image, sense whether drawn rotated +o specifically, if drawn rotated 90 in either direction, or 180 +o if just rotate/translate, then can use SCREEN_SPACE for fonts +o "Target VM failed to initialize" when using Present mode on Mac OS X +o http://code.google.com/p/processing/issues/detail?id=178 decisions o call reapplySettings() when using beginRecord()? @@ -327,6 +334,24 @@ o it needs a proper header on it, so maybe that's the difference w/ toString() o inefficient: the way new nodes are created o also inefficient: adding/removing kids just nukes the children array X toString() adds the XML header +X move to new XML library +X add XHTML parsing or any others? +X html parser? javax.swing.text.html.parser... has binary DTDs +X decision: it's someone else's job +X XMLElemnt.parse() or new XMLElement(xmldata)? +X same goes for PShape.. parse from a string? +X http://code.google.com/p/processing/issues/detail?id=277 +o Writing XML files (clean up the API) +o http://dev.processing.org/bugs/show_bug.cgi?id=964 +X XMLElement lacks add/set/remove methods +X http://code.google.com/p/processing/issues/detail?id=440 +_ finish updating XML documentation +_ http://code.google.com/p/processing/issues/detail?id=382 +_ json issues +_ http://www.xml.com/lpt/a/1658 +_ http://www.json.org/java/ +_ remove unnecessary processing.xml.* code from android-core +_ http://code.google.com/p/processing/issues/detail?id=214 andres _ OpenGL noSmooth() problems @@ -483,28 +508,6 @@ _ http://code.google.com/p/processing/issues/detail?id=722 _ add methods to PShape to apply all transformations in the tree _ need to clean up the hints in the reference/source -images -_ make loading images lighter, ala android -_ require loadPixels to get 2D image data from images -_ only load PImage pixels when necessary (faster for java2d) -_ loadImage() should use the faster loading methods -_ hint(DISABLE_IMAGE_CACHING) -_ add a note to the loadImage() reference page -_ figure out why 1024x768 image takes 3.5 seconds to load -_ would using a BufferedImage work better? -_ is the image actually a BufferedImage so PixelGrabber is a waste? -_ work through loadPixels in PImage, how consistent do we need to be? -_ with get() and set() methods, this gets really tricky (too slow) -_ could optimize by keeping a java image around, but table for later -_ it's too significant a change, and not enough time to test -_ callback for requestImage() -_ http://code.google.com/p/processing/issues/detail?id=641 -_ might work with the selectXxxx() functions as well - -_ json issues -http://www.xml.com/lpt/a/1658 -http://www.json.org/java/ - decisions to make _ possible addition for 'implementation' variable _ http://code.google.com/p/processing/issues/detail?id=281 @@ -540,10 +543,6 @@ _ decision: use getShape() (maybe add getShapeCount and getShape(int)) _ and remove getChild() from PShape _ oops: getParent() is in there, as is getChildren() and others... -fix opengl applets -_ implement new applet-opengl.html based on the latest jogl -_ jogl demos, NEWT examples crash on osx http://jogamp.org/jogl-demos/www/ -_ http://jogamp.org/jogl-demos/www/applettest-jnlp.html _ opengl applet problems _ http://code.google.com/p/processing/issues/detail?id=196 _ look into p5 bug with opengl in applets @@ -551,9 +550,7 @@ _ stop() called between tabs/pages, start() may be called again _ http://java.sun.com/docs/books/tutorial/deployment/applet/lifeCycle.html _ really, stop() should just call noLoop() (and start re-enable if done) _ and on android, start/stop can be used to save state information -_ OpenGL Applets won't load with JRE 6 update 21 or higher -_ need to make the final call on this and implement -_ http://code.google.com/p/processing/issues/detail?id=429 +_ fix opengl applets so that we can safely kill P3D _ smooth() not working with applets an createGraphics(JAVA2D) _ but works fine with applications @@ -655,8 +652,6 @@ _ or if the sketch window is foremost _ maybe a hack where a new menubar is added? _ --display not working on osx _ http://code.google.com/p/processing/issues/detail?id=71 -_ "Target VM failed to initialize" when using Present mode on Mac OS X -_ http://code.google.com/p/processing/issues/detail?id=178 CORE / PFont and text() @@ -747,6 +742,23 @@ _ box(40); CORE / PImage +_ make loading images lighter, ala android +_ require loadPixels to get 2D image data from images +_ only load PImage pixels when necessary (faster for java2d) +_ http://code.google.com/p/processing/issues/detail?id=60 +_ loadImage() should use the faster loading methods +_ hint(DISABLE_IMAGE_CACHING) +_ add a note to the loadImage() reference page +_ figure out why 1024x768 image takes 3.5 seconds to load +_ would using a BufferedImage work better? +_ is the image actually a BufferedImage so PixelGrabber is a waste? +_ work through loadPixels in PImage, how consistent do we need to be? +_ with get() and set() methods, this gets really tricky (too slow) +_ could optimize by keeping a java image around, but table for later +_ it's too significant a change, and not enough time to test +_ callback for requestImage() +_ http://code.google.com/p/processing/issues/detail?id=641 +_ might work with the selectXxxx() functions as well _ img.get() quirks _ http://code.google.com/p/processing/issues/detail?id=167 _ image resizing is ugly (just use java2d?) @@ -773,9 +785,6 @@ _ http://code.google.com/p/processing/issues/detail?id=60 _ add ability to control jpeg compression level with save() and saveFrame() _ or just write a better example for this one? _ http://code.google.com/p/processing/issues/detail?id=58 -_ when drawing an image, sense whether drawn rotated -_ specifically, if drawn rotated 90 in either direction, or 180 -_ if just rotate/translate, then can use SCREEN_SPACE for fonts _ should PImage smoothing not be turned on by default? handle this where? _ http://code.google.com/p/processing/issues/detail?id=165 _ Semitransparent rect drawn over image not rendered correctly diff --git a/todo.txt b/todo.txt index cda9b9edd..7642ba426 100644 --- a/todo.txt +++ b/todo.txt @@ -33,14 +33,11 @@ o prevent people from setting the font size too small in the editor o how do we figure out what "too small" is? X -> everyone thinks this is funny -_ fix opengl applets so that we can safely kill P3D _ automatically insert the 'import processing.opengl' when P3D used -_ add support for automatically including OpenGL when asking for P3D -_ when using P3D and not realizing that it's really OpenGL... +_ add support for automatically including OpenGL when asking for P3D +_ when using P3D and not realizing that it's really OpenGL... Exception in thread "Animation Thread" java.lang.NoClassDefFoundError: Could not initialize class javax.media.opengl.GLProfile Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path -_ why we can't do OpenGL applets that are self-signed (wiki?) -_ http://www.cert.org/blogs/vuls/2008/06/signed_java_security_worse_tha.html _ handleFindReference in Editor.java should be public for alternative modes (?) _ http://code.google.com/p/processing/issues/detail?id=713 @@ -91,7 +88,7 @@ _ casey: accidentally typing a letter at the top of the tab _ throws you onto the end of the last tab... exactly the worst location _ jer: omitting a semicolon shows the error on the line after it... _ find across all tabs (jer request) -_ http://code.google.com/p/processing/issues/detail?id=705 +_ http://code.google.com/p/processing/issues/detail?id=25 reference/examples _ import p5 reference into the javadoc @@ -160,7 +157,7 @@ _ http://code.google.com/p/processing/issues/detail?id=718 _ launch4j problem - FIXABLE _ no crash when double-clicking a sketch and loading it (?) -_ http://code.google.com/p/processing/issues/detail?id=231 +_ http://code.google.com/p/processing/issues/detail?id=176 _ also move back to using non-custom for 2.0 when we can drop QT support _ active editor not being set null