Hi, sorry if it’s a beginner’s problem, but when i try tu run this very small code :
import java.lang.System;
import org.lwjgl.opengl.GL11;
public class Version {
public static void main(String[] args) {
Version v = new Version();
v.version();
}
void version() {
String version;
version = GL11.glGetString(GL11.GL_VERSION);
System.out.println(version);
}
}
I get an NullPointerException.
Exception in thread "main" java.lang.NullPointerException
at org.lwjgl.opengl.GL11.glGetString(GL11.java:1556)
at Version.version(Version.java:13)
at Version.main(Version.java:8)
This line doesn’t want to compile : version = GL11.glGetString(GL11.GL_VERSION);
Did i have forgot something ?
Thanks (and sorry for my english, i’m a french beginner).
