Jump to content

[1.10.2] GL ERROR 1280: Invalid enum


Guest

Recommended Posts

Some of my blocks need little laser beams and because they need to be kind of flimsy and flickery, I am rendering them with a TESR. When the TESR renders the console gets spammed with this error:

########## GL ERROR ##########
@ Post render
1280: Invalid enum

I read somewhere that this can be caused by specific graphics card models but I doubt this is the cause as I am using a GTX 1080.

 

This is my TESR:

package XFactHD.rssmc.client.renderer.tesr;

import XFactHD.rssmc.common.blocks.gadget.TileEntityKapkanTrap;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.math.Vec3d;
import org.lwjgl.opengl.GL11;

public class TESRKapkanTrap extends TileEntitySpecialRenderer<TileEntityKapkanTrap>
{
    @Override
    public void renderTileEntityAt(TileEntityKapkanTrap te, double x, double y, double z, float partialTicks, int destroyStage)
    {
        Vec3d laser = te.getLaser();
        GlStateManager.pushMatrix();

        Tessellator tess = Tessellator.getInstance();
        VertexBuffer buffer = tess.getBuffer();

        //GlStateManager.disableLighting();
        //GlStateManager.enableBlend();
        //GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
        //GlStateManager.disableTexture2D();

        buffer.setTranslation(x, y, z);
        GlStateManager.glLineWidth(2F);
        buffer.begin(GL11.GL_LINE, DefaultVertexFormats.POSITION_COLOR);
        buffer.pos(0, 0, 0).color(1, 0, 0, 0).endVertex();
        buffer.pos(laser.xCoord, laser.yCoord, laser.zCoord).color(1, 0, 0, 0).endVertex();
        tess.draw();
        buffer.setTranslation(0, 0, 0);

        //GlStateManager.enableTexture2D();
        //GlStateManager.disableBlend();
        //GlStateManager.enableLighting();

        GlStateManager.popMatrix();
    }
}

No matter if the currently commented lines are commented out or not, the error persists.

 

PS: For the No-TESR advocates: I will be making this into a FastTESR when it works if it is doable.

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.

Guest
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.

Announcements



×
×
  • Create New...

Important Information

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