Maybe .. just maybe this is related to lightweight/heavyweight mixing
* the heavyweight component will disappear.
* This regression is not very serious since we never supported mixing of hw and lw components
* in general. The developer will have two options to resolve the problem:
* 1. By modifying the software to tag the glass pane properly, or
* 2. To suggest users to use the sun.awt.disableMixing system property
* to disable the hw/lw mixing code at all.
>
> Here are some snippets of my code:
>
>
> public class openGLModeFrame extends JInternalFrame {
> private openGLModePanel = new openGLModePanel();
>
> public openGLModeFrame() {
> this.add(plot);
> this.setLayout(new BorderLayout());
> }
> }
>
>
> public class openGLModePanel extends GLJPanel {
>
> private openGLMode plotter = new openGLMode();
>
> public openGLModePanel() {
> this.addGLEventListener(this.plotter);
> }
>
> }
>
>
> public class openGLMode implements GLEventListener {
>
> @Override
> public synchronized void display(GLAutoDrawable drawable) {
> GL2 gl = drawable.getGL().getGL2();
> gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);
>
> //do some GL drawings
>
> gl.glFlush();
> }
>
> @Override
> public void init(GLAutoDrawable drawable) {
> GL2 gl = drawable.getGL().getGL2();
>
> gl.setSwapInterval(1);
>
>
> gl.glClearColor(0f, 0f, 0f, 0f);
>
>
> gl.glShadeModel(GL2.GL_SMOOTH);
>
>
> gl.glEnable(GL2.GL_NORMALIZE);
>
>
> gl.glLineWidth(2f);
> gl.glPointSize(2f);
>
>
> gl.glPolygonMode(GL.GL_FRONT, GL2GL3.GL_LINES);
> gl.glPolygonMode(GL.GL_BACK, GL2GL3.GL_LINES);
>
>
> gl.glEnableClientState(GLPointerFunc.GL_VERTEX_ARRAY);
> gl.glEnableClientState(GLPointerFunc.GL_NORMAL_ARRAY);
> gl.glEnableClientState(GLPointerFunc.GL_COLOR_ARRAY);
>
>
> gl.glEnable(GL.GL_DEPTH_TEST);
>
>
> gl.glEnable(GL2.GL_BLEND);
> gl.glBlendFunc(GL2.GL_SRC_ALPHA, GL2.GL_ONE_MINUS_SRC_ALPHA);
>
>
> gl.glEnable(GL2.GL_LINE_SMOOTH);
> gl.glHint(GL2.GL_LINE_SMOOTH_HINT, GL2.GL_DONT_CARE);
> gl.glEnable(GL2.GL_POLYGON_SMOOTH);
> gl.glHint(GL2.GL_POLYGON_SMOOTH_HINT, GL2.GL_DONT_CARE);
>
>
> }
>
> @Override
> public void reshape(GLAutoDrawable drawable, int xstart, int ystart, int
> width,
> int height) {
> GL2 gl = drawable.getGL().getGL2();
>
>
> gl.glViewport(0, 0, width-1, height-1);
> gl.glMatrixMode(GLMatrixFunc.GL_PROJECTION);
> gl.glLoadIdentity();
> gl.glOrthof(-2f, 2f, -2f, 2f, 2f, -2f); //looking from negative -2 (z) to
> positive 2 (z)
> gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);
> gl.glLoadIdentity();
>
>
> this.createLights(gl);
>
> }
> }
>
>
> ______________________________________
> View message @
http://jogamp.762907.n3.nabble.com/GLJPanel-on-JInternalFrame-tp921862p921862.html> To start a new topic under jogamp, email
[hidden email]
> To unsubscribe from jogamp, click
http://jogamp.762907.n3.nabble.com/subscriptions/Unsubscribe.jtp?code=c2dvdGhlbEBqYXVzb2Z0LmNvbXw3NjI5MDd8MzkxNDI4MzU5>