【发布时间】:2016-12-05 03:10:39
【问题描述】:
我正在学习有关 lwjgl 基础知识的教程。我目前正在尝试制作一个简单的窗口。但是我有两个问题。
在我的 init() 方法中我写了
if(glfwInit() != GL_TRUE){
throw new IllegalStateException("Unable to initialize GLFW");
}
在我的 run() 方法中我写了
if(glfwWindowShouldClose(window) == GL_TRUE){
running = false;
}
在这两种情况下我都会得到
Exception in thread "EndlessRunner" java.lang.Error: Unresolved compilation problem:
The operator != is undefined for the argument type(s) boolean, int
at Main.init(Main.java:28)
at Main.run(Main.java:43)
at java.lang.Thread.run(Unknown Source)
但似乎所有教程都以一种或另一种方式使用这些行。
【问题讨论】: