简体   繁体   English

在LWJGL中设置显示可见性

[英]Set Display visibility in LWJGL

In LWJGL 2, is there a way to set the display visibility? 在LWJGL 2中,是否可以设置显示可见性? Similar to how you can call setVisible on a JFrame to show or hide the window. 类似于在JFrame上调用setVisible来显示或隐藏窗口的方式。 Basically what I want to do is create the OpenGL context using Display.create(), then show a loading splash screen while all my resources are loaded (requires context to be created) and then make the display visible. 基本上,我想做的是使用Display.create()创建OpenGL上下文,然后在加载所有资源时显示一个加载初始屏幕(需要创建上下文),然后使显示可见。

You could parent the display in a Canvas object you create, via Display.setParent. 您可以通过Display.setParent在创建的Canvas对象中父显示。 Then any changes to the parent's visibility will be reflected in the display object. 然后,对父母可见性的任何更改都将反映在显示对象中。

Otherwise couldn't you just make the splash screen in the context itself, and just switch what you're rendering when ready? 否则,您是否不能仅在上下文本身中创建启动画面,并在准备好后就切换要渲染的内容?

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

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