Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

Oh, ok. I'll try that.

That fixed the error but the line still doesn't render (or at least I can't find it). I tried cranking up the line width to 10 but that didn't get me anywhere.

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.