Ceci est seulement une petite partie du code. Je me demande pourquoi ma méthode d'affichage
ne fonctionne pas, même si j'utilise la bibliothèque opengl et que j'ai défini le chemin d'accès natif
.Pourquoi ma méthode Display dans la classe opengl ne fonctionne pas
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.DisplayMode;
public class Window
{
public static void CreateWindow(int width, int height, String title)
{
Display.setTitle(title);
try
{
Display.setDisplayMode(new DisplayMode(width, height));
Display.create();
Keyboard.create();
Mouse.create();
}
catch (LWJGLException e)
{
e.printStackTrace();
}
}
}
Erreurs:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Display cannot be resolved
Display cannot be resolved
DisplayMode cannot be resolved to a type
Display cannot be resolved
Keyboard cannot be resolved
Mouse cannot be resolved
LWJGLException cannot be resolved to a type
at com.base.engine.rendering.Window.CreateWindow(Window.java:14)
at com.base.engine.core.CoreEngine.CreateWindow(CoreEngine.java:27)
at com.base.game.Main.main(Main.java:10)
Peut-être parce que vous utilisez LWJGL 3 où ces classes n'existent pas. – Vallentin