[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl GLView.java,1.17,1.18
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2005-10-21 08:44:04
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5601/src/net/sourceforge/bprocessor/gl Modified Files: GLView.java Log Message: GLView shows the GUI window when done initialising PencilTool calls Geometry.insert(edges) to find newly created Surfaces Index: GLView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/GLView.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** GLView.java 2 Oct 2005 14:48:23 -0000 1.17 --- GLView.java 21 Oct 2005 08:43:57 -0000 1.18 *************** *** 21,25 **** import net.java.games.jogl.GLDrawable; import net.java.games.jogl.GLDrawableFactory; ! import net.java.games.jogl.GLCanvas; import java.awt.Dimension; import java.awt.BorderLayout; --- 21,27 ---- import net.java.games.jogl.GLDrawable; import net.java.games.jogl.GLDrawableFactory; ! import net.java.games.jogl.Version; ! ! import java.awt.Component; import java.awt.Dimension; import java.awt.BorderLayout; *************** *** 28,32 **** import javax.swing.JLabel; import javax.swing.JPopupMenu; ! import org.apache.log4j.Logger; --- 30,34 ---- import javax.swing.JLabel; import javax.swing.JPopupMenu; ! import javax.swing.SwingUtilities; import org.apache.log4j.Logger; *************** *** 39,43 **** /** GL canvas */ ! private GLCanvas glc; /** current event listener */ --- 41,45 ---- /** GL canvas */ ! private GLDrawable glc; /** current event listener */ *************** *** 54,67 **** */ public GLView() { ! log.info("Creating GLView"); GLCapabilities glCap = new GLCapabilities(); glCap.setDoubleBuffered(true); glCap.setHardwareAccelerated(true); glc = GLDrawableFactory.getFactory().createGLCanvas(glCap); ! JPanel jp = new JPanel(); jp.setPreferredSize(new Dimension(450, 450)); jp.setLayout(new BorderLayout()); ! jp.add(glc, BorderLayout.CENTER); JPanel lengthPanel = new JPanel(); --- 56,69 ---- */ public GLView() { ! log.info("Using JOGL version " + Version.getVersion()); GLCapabilities glCap = new GLCapabilities(); glCap.setDoubleBuffered(true); glCap.setHardwareAccelerated(true); glc = GLDrawableFactory.getFactory().createGLCanvas(glCap); ! //glc = GLDrawableFactory.getFactory().createGLJPanel(glCap); JPanel jp = new JPanel(); jp.setPreferredSize(new Dimension(450, 450)); jp.setLayout(new BorderLayout()); ! jp.add((Component) glc, BorderLayout.CENTER); JPanel lengthPanel = new JPanel(); *************** *** 81,86 **** GUI.getInstance().registerPanel(jp, GUI.SPLIT_MIDDLE); - log.info("Done Creating GlView"); glc.setAutoSwapBufferMode(false); } --- 83,95 ---- GUI.getInstance().registerPanel(jp, GUI.SPLIT_MIDDLE); glc.setAutoSwapBufferMode(false); + repaint(); + SwingUtilities.invokeLater ( + new Runnable() { + public void run() { + GUI.getInstance().present(); + } + } + ); } *************** *** 179,183 **** */ public void popup(JPopupMenu pp, int x, int y) { ! pp.show(glc, x, y); } --- 188,192 ---- */ public void popup(JPopupMenu pp, int x, int y) { ! pp.show((Component) glc, x, y); } |