用JOGL进行全屏摆动 [英] Full Screen Swing with JOGL
问题描述
我正在尝试制作一个Swing应用程序,该应用程序以全屏方式呈现,请按照以下说明 http://download.oracle.com/javase/tutorial/extra/fullscreen/exclusivemode.html 以及源代码 http://download.oracle.com/javase/tutorial/extra/fullscreen/example-1dot4/DisplayModeTest.java
这个效果很好,但是当我将GLCanvas对象作为框架的一个组件放置时,所有显示的都是黑屏。退出全屏幕后,我可以在全屏幕中看到OpenGL图像片刻,然后在窗口中再次显示。即使没有显示任何内容,我也可以像swing按钮那样与swing组件交互,就像它们一样。
在我看来,它几乎就像另一个空白缓冲区正在绘制高于实际的挥杆应用程序,但我不明白为什么会这样。或者,我想知道这是不是一个问题,全屏显示正在处理JOGL的图形卡?
我不需要 硬件加速全屏,虽然它可能很好 - 如果这是无法解决的,有没有更强大的方法可以在Java应用程序中实现全屏?
尝试将 -Dsun.java2d.noddraw = true
禁用为这个FAQ 说。
I am trying to make a Swing application which renders in full screen, following the description here http://download.oracle.com/javase/tutorial/extra/fullscreen/exclusivemode.html and the source code here http://download.oracle.com/javase/tutorial/extra/fullscreen/example-1dot4/DisplayModeTest.java
This works quite well, however as soon as I drop in a GLCanvas object as one of the components of the frame, all that shows up is a black screen. Exiting full screen, I can see the OpenGL image for a moment at full screen, then it shows up fine again in a window. Even though nothing is being displayed, I can interact with the swing components, like buttons, as if they were.
It seems to me almost like another blank buffer is being drawn above the actual swing app, but I can't figure out why that would be. Alternatively, I wonder if it's not an issue with the full screen being handled by the graphics card which is also handling JOGL?
I don't need the hardware accelerated full screen, though it might be nice - if this is unresolvable, is there some more robust way to implement full screen in a Java app?
Try disabling -Dsun.java2d.noddraw=true
as this FAQ says.
这篇关于用JOGL进行全屏摆动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!