Jump to content

How to use GLAllocation.generateDisplayLists on 1.16?


Recommended Posts

35 minutes ago, diesieben07 said:

Why are you calling this method? What is your goal?

I am trying to make my mod support Armourers-Workshop's  skin (.armourer).

package moe.plushie.armourers_workshop.client.render;

import java.util.concurrent.atomic.AtomicInteger;

import org.lwjgl.opengl.GL11;

import net.minecraft.client.renderer.GLAllocation;

public class DisplayList {
    private static AtomicInteger LIST_COUNT = new AtomicInteger(0);
    private int list; 
    private boolean compiled = false;
    public static int getListCount() {
        return LIST_COUNT.get();
    public void begin() {
        if (compiled) {
        list = GLAllocation.generateDisplayLists(1);//TODO ?
        GL11.glNewList(list, GL11.GL_COMPILE);
    public boolean isCompiled() {
        return compiled;
    public void end() {
        compiled = true;
    public void render() {
        if (compiled) {
    public void cleanup() {
        GLAllocation.deleteDisplayLists(list);//TODO ?
        compiled = false;
    protected void finalize() throws Throwable {
        if (compiled) {


Edited by byxiaobai_
Link to comment
Share on other sites

4 minutes ago, diesieben07 said:

Display lists are old and obsolete OpenGL technology, which Minecraft no longer uses in 1.16. As such its GLAllocation class is gone. You should move on to modern rendering techniques as well. If you do not want to (which will probably make your things incompatible with much of Minecraft's rendering, especially on 1.17, but I don't know much about that), use the native methods from LWJGL.

Is there any tutorial on modern rendering techniques?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.