Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31362/src/net/sourceforge/bprocessor/gl/view
Modified Files:
GLPreviewPanel.java
Log Message:
fixed compile error (that is moved glcanvas creation to GLPreviewPanel)
Index: GLPreviewPanel.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/GLPreviewPanel.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** GLPreviewPanel.java 19 Nov 2007 17:50:17 -0000 1.1
--- GLPreviewPanel.java 19 Nov 2007 17:57:32 -0000 1.2
***************
*** 16,19 ****
--- 16,20 ----
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCanvas;
+ import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLEventListener;
import javax.media.opengl.glu.GLU;
***************
*** 35,48 ****
private GL gl;
private GLU glu;
/**
* Default constructor
- * @param glCanvas The glcanvas
*/
! public GLPreviewPanel(GLCanvas glCanvas) {
super();
this.setLayout(new BorderLayout());
! this.glCanvas = glCanvas;
this.add(glCanvas, BorderLayout.CENTER);
this.glCanvas.addGLEventListener(this);
this.setMinimumSize(new Dimension(150, 200));
this.setPreferredSize(new Dimension(150, 200));
--- 36,53 ----
private GL gl;
private GLU glu;
+
/**
* Default constructor
*/
! public GLPreviewPanel() {
super();
this.setLayout(new BorderLayout());
! GLCapabilities glCap = new GLCapabilities();
! glCap.setDoubleBuffered(true);
! glCap.setHardwareAccelerated(true);
! this.glCanvas = new GLCanvas(glCap);
this.add(glCanvas, BorderLayout.CENTER);
this.glCanvas.addGLEventListener(this);
+
this.setMinimumSize(new Dimension(150, 200));
this.setPreferredSize(new Dimension(150, 200));
|