Update Display.java
This commit is contained in:
parent
397850ab4c
commit
0b97da22f8
1 changed files with 3 additions and 3 deletions
|
@ -21,7 +21,7 @@ public class Display {
|
||||||
private static boolean hasResized = false;
|
private static boolean hasResized = false;
|
||||||
|
|
||||||
public static void create(String title,int width,int height){
|
public static void create(String title,int width,int height){
|
||||||
if ( glfwInit() != GL11.GL_TRUE )
|
if ( !glfwInit() )
|
||||||
throw new IllegalStateException("Unable to initialize GLFW");
|
throw new IllegalStateException("Unable to initialize GLFW");
|
||||||
|
|
||||||
TITLE = title;
|
TITLE = title;
|
||||||
|
@ -31,7 +31,7 @@ public class Display {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void create(String title,int width,int height,int major,int minor){
|
public static void create(String title,int width,int height,int major,int minor){
|
||||||
if ( glfwInit() != GL11.GL_TRUE )
|
if ( !glfwInit() )
|
||||||
throw new IllegalStateException("Unable to initialize GLFW");
|
throw new IllegalStateException("Unable to initialize GLFW");
|
||||||
|
|
||||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, major); // Nous voulons OpenGL 3.3
|
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, major); // Nous voulons OpenGL 3.3
|
||||||
|
@ -57,7 +57,7 @@ public class Display {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void create(String title,int width,int height,int major,int minor,int sample){
|
public static void create(String title,int width,int height,int major,int minor,int sample){
|
||||||
if ( glfwInit() != GL11.GL_TRUE )
|
if ( !glfwInit() )
|
||||||
throw new IllegalStateException("Unable to initialize GLFW");
|
throw new IllegalStateException("Unable to initialize GLFW");
|
||||||
|
|
||||||
glfwWindowHint(GLFW_SAMPLES, sample); // antialiasing 4x
|
glfwWindowHint(GLFW_SAMPLES, sample); // antialiasing 4x
|
||||||
|
|
Reference in a new issue