tol10
YaBB Newbies
Offline
Posts: 5
Denmark
openGL end Eclipse problems
Sep 26th , 2007, 11:18pm
I'm trying to make the jump to eclipse, but openGL is giving me some strange problems. The same code acts differently in processing and eclipse. When the sketch is running from eclipse it makes strange stops, especially when the mouse is over the sketch. Also openGL from eclipse is not fast, actually when I use PFont at the same time it seems slower. The thing is I'm not sure openGL is running at all, maybe only P3D or something because I don't need to import openGL in my eclipse sketch, but I need to have jogl.jar in my reference libraries. I do have -Djava.library.path="C:\programmer\processing\libraries\opengl\library" in my VM arguments And I don't get any regular warnings when it's running but when I'm switching back and forth from eclipse and processing testing this issue I sometimes get a bug (I haven't reported...sorry). Here is and example with eclipse and processing code: eclipse code: package digitalDecay; import processing.core.*; @SuppressWarnings("serial") public class TestText extends PApplet { final int WIDTH = 300; final int HEIGHT = 200; int rotate = 0; int num = 70; public void setup() { size(WIDTH, HEIGHT, OPENGL); } public void draw() { background(150); fill(255); translate(WIDTH / 2, HEIGHT / 2); rotate(radians(rotate)); for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { ellipse(i * WIDTH / num - WIDTH / 2, j * WIDTH / num - WIDTH / 2, 5, 5); } } rotate++; } } processing code: import processing.opengl.*; final int WIDTH = 300; final int HEIGHT = 200; int rotate = 0; int num = 70; void setup() { size(WIDTH, HEIGHT, OPENGL); } void draw() { background(150); fill(255); translate(WIDTH / 2, HEIGHT / 2); rotate(radians(rotate)); for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { ellipse(i * WIDTH / num - WIDTH / 2, j * WIDTH / num - WIDTH / 2, 5, 5); } } rotate++; } I've had problems with openGL before with smooth(), but that's a graphic card or driver problem, this is different because in processing there isn't any problems. Does anyone have an idea what the problem is. I've been trying for days and I really don't have any idea.