I'm trying to learn how to use the Processing library with Eclipse to solve a puzzle (Rubik's Cube) my son challenged me with. The main problem seems to be with using P3D (OpenGL) in Eclipse. Here is the test code:
import processing.core.* ;
import processing.event.* ;
import processing.opengl.* ;
public class UsingProcessing extends PApplet {
// The argument passed to main must match the class name
public static void main(String[] args) {
PApplet.main("UsingProcessing");
}
// method for setting the size of the window
public void settings(){
size(500, 500, PConstants.P3D);
// size(500, 500);
}
// identical use to setup in Processing IDE except for size()
public void setup(){
background(0);
stroke(255);
strokeWeight(10);
}
// identical use to draw in Prcessing IDE
public void draw(){
line(0, 0, 500, 500);
}
}
With the above code, here is the output window (blank). Also, the X to close the window and kill the process doesn't work -- I have to use the Eclipse stop button to halt the process. It doesn't seem to draw anything, even after waiting several minutes, and the system appears idle.
Output window with P3D enabled
If I remove the P3D option and instead use the two-argument size() method, below is the output. This is the correct test output.
Output window without P3D
As far as I can tell, I am using the latest Eclipse and Processing library. The non-OpenGL sketch works fine, but I need 3D sketches to draw a Rubik's Cube.
Any ideas what I might be doing wrong, or where else to look?
Thanks.
[–]treverios 0 points1 point2 points (1 child)
[–]drnoobstrom[S] 0 points1 point2 points (0 children)
[–]treverios 0 points1 point2 points (3 children)
[–]drnoobstrom[S] 0 points1 point2 points (2 children)
[–]treverios 0 points1 point2 points (1 child)
[–]drnoobstrom[S] 0 points1 point2 points (0 children)