Canvas3D 和 Swing

发布于 2024-07-09 10:22:19 字数 299 浏览 7 评论 0原文

的性能问题

这个问题是关于 Mac OS X Canvas3D 对象嵌入在 JPanel 中 ; 然后该面板与 Swing 构建的应用程序的其余部分集成。 在该画布中,我通过应用渲染一个简单的立方体 某些转变。 初次启动时效果很好。 但是,当我尝试调整窗口大小或对垂直或水平分割栏按钮执行某些操作时。Swing 组件需要一定的时间才能出现在屏幕上。 先出现一个闪亮的白色东西,然后才会出现摇摆组件? (完全是说会发生闪烁之类的事情)。 有没有办法解决这个问题?

请在这方面帮助我。

J3DS平格

This question is regarding the performance issue in Mac OS X

Canvas3D object is embedded in a JPanel; then the panel is integrated with the rest of the Swing-built application. Within that Canvas I am rendering a simple cube by applying
certain transformations. At the initial launch It works fine. But when i try to resize the window or perform some operations on vertical or horizontal split bar buttons.Swing components take certain time to appear on the screen. A flashy white coloured thing appears first then swing components will appear? ( Totally saying flickering kind of stuff will happen). Is there any to solve this issue?

Kindly help me in this regard.

J3DSwinger

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

霊感 2024-07-16 10:22:20

如果您遇到 Canvas3D,您应该尝试离屏渲染、双缓冲和使用计时器主动渲染。 我会将渲染限制在合理的 fps 范围内。

If you are having issues with default rendering of Canvas3D, you should try off-screen rendering, double buffering, and actively rendering using timer. I would cap the rendering to some reasonable fps.

栖竹 2024-07-16 10:22:20

Java3D 1.5 现在在实验包中包含一个名为 JCanvas3D 的组件,它可以执行离屏渲染、双缓冲以及其他使 Java3D 在 Swing GUI 中正常运行所需的功能。

请参阅 com.sun.j3d.exp.swing.JCanvas3D

Java3D 1.5 now includes a component called JCanvas3D in the experimental package that does the off-screen rendering, double buffering and other things required to get Java3D to play nice in a Swing GUI.

See com.sun.j3d.exp.swing.JCanvas3D

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文