如何在LWJGL中全屏显示? [英] How do I make a full screen in LWJGL?

查看:73
本文介绍了如何在LWJGL中全屏显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用LWJGL制作日食游戏,我想知道如何通过更改以下一些代码使屏幕全屏显示.你能帮忙吗?

I am making a game in eclipse with LWJGL and I would like to know how to make the screen go full screen by changing some of the following code. Could you help, please?

public static void main(String args[]) {
    AppGameContainer appgc;
    try{
        appgc = new AppGameContainer(new Game(gamename));
        appgc.setDisplayMode(700, 500, false);
        appgc.start();
    }catch(SlickException e){
        e.printStackTrace();
    }

}

推荐答案

The JavaDoc says that the 3th param of setDisplayMode indicates the fullscreen flag. Try putting it on true.

这篇关于如何在LWJGL中全屏显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆