Adaptive raster culling #41
+5
@@ -9,9 +9,11 @@ import org.lwjgl.egl.EGL15;
|
|||||||
import org.lwjgl.egl.EGLCapabilities;
|
import org.lwjgl.egl.EGLCapabilities;
|
||||||
import org.lwjgl.opengl.GL;
|
import org.lwjgl.opengl.GL;
|
||||||
import org.lwjgl.opengl.GL11C;
|
import org.lwjgl.opengl.GL11C;
|
||||||
|
import org.lwjgl.system.Configuration;
|
||||||
import org.lwjgl.system.JNI;
|
import org.lwjgl.system.JNI;
|
||||||
import org.lwjgl.system.MemoryStack;
|
import org.lwjgl.system.MemoryStack;
|
||||||
|
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.IntBuffer;
|
import java.nio.IntBuffer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -36,6 +38,8 @@ public final class HeadlessGl {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Configuration.OPENGL_EXPLICIT_INIT.set(true);
|
||||||
|
|
||||||
long display = openDisplay();
|
long display = openDisplay();
|
||||||
|
|
||||||
try (MemoryStack stack = MemoryStack.stackPush()) {
|
try (MemoryStack stack = MemoryStack.stackPush()) {
|
||||||
@@ -65,6 +69,7 @@ public final class HeadlessGl {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GL.create((ByteBuffer name) -> EGL10.eglGetProcAddress(name));
|
||||||
GL.createCapabilities();
|
GL.createCapabilities();
|
||||||
|
|
||||||
// GLRenderDevice requires this; the benchmarks never touch vanilla GL state.
|
// GLRenderDevice requires this; the benchmarks never touch vanilla GL state.
|
||||||
|
|||||||
Reference in new issue
Block a user