开发者

GLJPanel Stops Redrawing

I am using Jogl to create a GLJPanel inside a Netbeans Platform module project (this is a very specific type of Java application that creates a modular window within a netbeans platform app, so there are multiple windows you can drag around).

I can't use GLCanvas because it doesn't work on Windows or Linux (Netbeans and Jogl is pretty much a match made in hell). I can't use NEWT because that doesn't work on the Mac. So I'm using a GLJPanel, even though it is slow.

Anyway, it usually works at first. Then, if I resize or do something else in the program, the window seems to lose focus and never regain it. The window won't redraw. I still get mouse events (no key events, though!). I know this because I can click on another 开发者_JAVA技巧window and it will redraw the GLJPanel once. Otherwise the screen doesn't redraw.

I have tried all combinations of setting sun.java2d.opengl and sun.java2d.noddraw to true and false, as per http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/awt/GLCanvas.html#java2dgl

This is part of an open source project, so the source of my component is at

https://github.com/mtakemiya/BMIDesktop/blob/dfe63cc789d42bff99922f36b683bd88e64632df/timeline/src/jp/atr/dni/bmi/desktop/timeline/TimelineTopComponent.java

Am I doing anything obviously wrong?


I wouldn't set those flags to true because had some bugs with gui elements.I have coded my program without these flags set to true.I would recomand to override the GLEventListener of the GLPanel or GLCanvas if you got it to work.Should repaint continuously.Waiting you're response maybe if you give more details i can help you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜