简体   繁体   English

JOGL与秋千

[英]JOGL with Swing

I am new to JOGL. 我是JOGL的新手。 I have studied about AWT and Swing in java. 我研究了Java中的AWTSwing I have studied that mixing of AWT and Swing (heavywaight and lightwaight components) is not good and give unpredictable results. 我研究过,AWT和Swing(重质和轻质成分)的混合效果不好,并且给出了无法预测的结果。 I have studied about JOGL with swing from here . 我从这里开始学习JOGL。
But GLCanvas class is AWT component and GLJPanel is slow in performance. 但是GLCanvas类是AWT组件, GLJPanel的性能很慢。 So I want to know that which API I have to use with JOGL while maintaining good performance. 因此,我想知道在保持良好性能的同时必须与JOGL一起使用哪个API

You can put a GLCanvas into a JPanel except in some particular cases (with JInternalFrame), when you need translucent components and there can be some problems when overlapping as Marco13 wrote. 您可以将GLCanvas放入JPanel中,除非在某些特殊情况下(使用JInternalFrame),这时您需要半透明的组件,并且像Marco13所写的那样在重叠时会出现一些问题。 JOGL has its own windowing toolkit since its second major version, it's called NEWT, you can use it with AWT, SWT and Swing, it's the best in terms of performance: http://jogamp.org/wiki/index.php/Jogl_FAQ#How_to_use_Newt_with_multiple_Windows_.26_Threads 自第二个主要版本以来,JOGL拥有自己的窗口工具包,称为NEWT,您可以将其与AWT,SWT和Swing一起使用,这在性能方面是最好的: http : //jogamp.org/wiki/index.php/Jogl_FAQ #How_to_use_Newt_with_multiple_Windows_.26_Threads

GLJPanel isn't slow in general, it is less fast than GLCanvas, it is really slow on some combinations of hardware and operating systems. GLJPanel通常并不慢,它不如GLCanvas快,在某些硬件和操作系统组合上确实很慢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM