开发者

swing and jogl usage in a windowed application

开发者 https://www.devze.com 2023-03-18 09:18 出处:网络
I have a problem solving a problem concerning jo开发者_StackOverflowgl and swing. i want to use jogl whit swing components but it doesn\'t refresh all the time. how can i repaint, refresh the opengl \

I have a problem solving a problem concerning jo开发者_StackOverflowgl and swing. i want to use jogl whit swing components but it doesn't refresh all the time. how can i repaint, refresh the opengl "image" in the swing component (update).when i change the position of my opengl primitives and i call a repaint() or an invalidate function then the screen turns black. If somebody managed to over come this obstacle please reply to this topic i used the demo application from the netBeans plugin (GLJPanel or Canvas) thanks , zsala


UPDATE:

Problem fixed. Anyone having the same problem should implement JOGL canvas and put that canvas in the place of the canvas in use by the JFrame.

Implement GLActionListener and you're done. It's refreshing continuously with no problem.

0

精彩评论

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