Hi there,
I have an issue while integrating my PApplet using OpenGL in a new Java Desktop Application generated by Netbeans. Indeed, sometimes my PApplet is displayed properly, but sometimes it is also displayed black with my testing shape rendered in a strange way at the bottom left of the applet.
Here is a screenshot: h t t p : / / img185.imageshack.us/my.php?image=capturei.png
And here is my code:
Code:public class TestView extends FrameView {
public TestView(SingleFrameApplication app) {
super(app);
initComponents();
…
Preview p = new Preview();
mainPanel.add(p);
p.init();
}
Code:package test;
import processing.core.*;
import processing.opengl.*;
class Preview extends PApplet {
@Override
public void setup() {
size(500,500,OPENGL);
}
@Override
public void draw() {
ellipse(100,100,20,20);
}
}
I downloaded JOGL from its official website and I added the two JARs gluegen-rt.jar and jogl.jar to my project.
You can get the whole source code of this testing project here: h t t p : / / w w w.megaupload.com/?d=2TWPDWEZ
Am I doing anything wrong? Using the JAVA2D default renderer it works fine.
Thanks in advance for any help!