diff --git a/core/src/processing/core/PSurface.java b/core/src/processing/core/PSurface.java index 57a48bb28..4a8a39204 100644 --- a/core/src/processing/core/PSurface.java +++ b/core/src/processing/core/PSurface.java @@ -97,6 +97,7 @@ public interface PSurface { //public void initImage(PGraphics gr, int wide, int high); // create pixel buffer, called from allocate() to produce a compatible image for rendering efficiently // public void initImage(PGraphics gr); + public Component getComponent(); /** diff --git a/core/src/processing/core/PSurfaceAWT.java b/core/src/processing/core/PSurfaceAWT.java index 1a1301b76..797367128 100644 --- a/core/src/processing/core/PSurfaceAWT.java +++ b/core/src/processing/core/PSurfaceAWT.java @@ -803,6 +803,12 @@ public class PSurfaceAWT extends PSurfaceNone { */ + @Override + public Component getComponent() { + return canvas; + } + + @Override public void setSmooth(int level) { } diff --git a/core/todo.txt b/core/todo.txt index 652472bb8..40b785520 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -14,6 +14,8 @@ _ may be cause of some of the display placement issues w/ multiple displays _ seem to recall one of the bugs mentioning stacked displays _ need to change to iterate through display rectangles _ tweak mode ColorSelector is broken (uses getComponent()) +_ closing a sketch window manually (not hitting Stop) not killing sketch +_ at least with the Java2D renderer rendering/performance/surface diff --git a/java/libraries/jogl/src/processing/jogl/PSurfaceJOGL.java b/java/libraries/jogl/src/processing/jogl/PSurfaceJOGL.java index f5f14b131..35f854adc 100644 --- a/java/libraries/jogl/src/processing/jogl/PSurfaceJOGL.java +++ b/java/libraries/jogl/src/processing/jogl/PSurfaceJOGL.java @@ -2,6 +2,7 @@ package processing.jogl; import java.awt.Canvas; import java.awt.Color; +import java.awt.Component; import java.awt.EventQueue; import java.awt.Frame; import java.awt.Rectangle; @@ -60,24 +61,26 @@ public class PSurfaceJOGL implements PSurface { Throwable drawException; Object waitObject = new Object(); + NewtCanvasAWT canvas; + + public PSurfaceJOGL(PGraphics graphics) { this.graphics = graphics; this.pgl = (PJOGL) ((PGraphicsOpenGL)graphics).pgl; } - public void initOffscreen() { + public void initOffscreen(PApplet sketch) { // TODO Auto-generated method stub - } - public Canvas initCanvas(PApplet sketch) { + public Canvas initComponent(PApplet sketch) { this.sketch = sketch; sketchWidth = sketch.sketchWidth(); sketchHeight = sketch.sketchHeight(); if (window != null) { - NewtCanvasAWT canvas = new NewtCanvasAWT(window); + canvas = new NewtCanvasAWT(window); canvas.setBounds(0, 0, window.getWidth(), window.getHeight()); // canvas.setBackground(new Color(pg.backgroundColor, true)); canvas.setFocusable(true); @@ -424,6 +427,10 @@ public class PSurfaceJOGL implements PSurface { } } + public Component getComponent() { + return canvas; + } + public void setSmooth(int level) { pgl.reqNumSamples = level; GLCapabilities caps = new GLCapabilities(profile); @@ -453,10 +460,6 @@ public class PSurfaceJOGL implements PSurface { } - public void blit() { - // TODO Auto-generated method stub - } - class DrawListener implements GLEventListener { public void display(GLAutoDrawable drawable) { pgl.getGL(drawable); diff --git a/todo.txt b/todo.txt index c2d113914..84745d6bc 100644 --- a/todo.txt +++ b/todo.txt @@ -10,6 +10,9 @@ _ Error message changes from "function" to "method" _ https://github.com/processing/processing/issues/3225 +_ move processing-java inside the Java Mode? +_ make a Tool that installs it for all platforms, not just OS X +_ not really part of the 'build' anymore _ fix this error message: Experimental Mode: Yikes! Can't find "processing.opengl" library! Line: 2 in tab: particle_signature_30_01 _ 'ant clean' not removing old versions created by dist _ finish adding 'examples' contribs @@ -41,6 +44,8 @@ _ break out a gui package (get class count down in .app) _ remove deprecated methods _ do the right thing on passing around List vs ArrayList and others _ PreferencesFrame is a misnomer (not a frame itself) +_ change to PreferencesDialog, and make it a dialog? +_ move Library to LibraryContribution and into contrib? gui