Add display list compilation/optimization (#1141)

This commit is contained in:
Jason Mitchell authored and GitHub committed 2025-12-02 21:43:17 -08:00
1 parent 55811b9d7b
commit 33de1de9c4
118 files changed
+11342 -670

No files matched your search

@@ -1,10 +1,6 @@
package jss.notfine.render;
import com.gtnewhorizon.gtnhlib.client.renderer.TessellatorManager;
import com.gtnewhorizon.gtnhlib.client.renderer.vbo.VBOManager;
import com.gtnewhorizon.gtnhlib.client.renderer.vertex.DefaultVertexFormat;
import com.gtnewhorizons.angelica.config.AngelicaConfig;
import jss.notfine.core.Settings;
import jss.util.RandomXoshiro256StarStar;
import net.minecraft.client.renderer.RenderGlobal;
@@ -16,18 +12,9 @@ public class RenderStars {
//private static final ResourceLocation locationStarsPng = new ResourceLocation("textures/colormap/stars.png");
public static void reloadStarRenderList(RenderGlobal render) {
if(AngelicaConfig.enableVBO) {
TessellatorManager.startCapturing();
renderStars();
VBOManager.registerVBO(render.starGLCallList, TessellatorManager.stopCapturingToVBO(DefaultVertexFormat.POSITION));
} else {
GL11.glPushMatrix();
GL11.glNewList(render.starGLCallList, GL11.GL_COMPILE);
renderStars();
GL11.glEndList();
GL11.glPopMatrix();
}
GL11.glNewList(render.starGLCallList, GL11.GL_COMPILE);
renderStars();
GL11.glEndList();
}
public static void renderStars() {