Jump to content

[1.7.2] GLError @ Post Render 1286: Invalid framebuffer operation [SOLVED]


Recommended Posts

Posted

I keep getting this error. It prints to my console continuously until I stop the game. It doesn't crash anything and everything is rendered properly, and it only seems to happen at random.

 

Like, I can load the game fine, be around my custom blocks, with no error.

 

I mention my custom blocks because it only started happening after I made them.

 

the full error thing is literally just

 

[18:29:07] [Client thread/ERROR]: ########## GL ERROR ##########
[18:29:07] [Client thread/ERROR]: @ Post render
[18:29:07] [Client thread/ERROR]: 1286: Invalid framebuffer operation

 

here's my block render file

 

package com.noshzeldamod.block.render;

import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;

import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;

import com.noshzeldamod.block.model.ModelZeldaPot;
import com.noshzeldamod.block.tileentity.TileEntityZeldaPot;
import com.noshzeldamod.lib.Strings;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class RenderZeldaPot extends TileEntitySpecialRenderer
{
    private static final ResourceLocation field_147520_b = new ResourceLocation(Strings.modid + ":textures/blocks/zeldaPot.png");
    private ModelZeldaPot field_147521_c = new ModelZeldaPot();

    public void renderTileEntityAt(TileEntityZeldaPot p_147519_1_, double p_147519_2_, double p_147519_4_, double p_147519_6_, float p_147519_8_)
    {

        this.bindTexture(field_147520_b);
        GL11.glPushMatrix();
        GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glTranslatef((float)p_147519_2_, (float)p_147519_4_ + 1.0F, (float)p_147519_6_ + 1.0F);
        GL11.glScalef(1.0F, -1.0F, -1.0F);
        GL11.glTranslatef(0.5F, -0.5F, 0.5F);
        this.field_147521_c.render();
        GL11.glDisable(GL12.GL_RESCALE_NORMAL);
        GL11.glPopMatrix();
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    }

    public void renderTileEntityAt(TileEntity p_147500_1_, double p_147500_2_, double p_147500_4_, double p_147500_6_, float p_147500_8_)
    {
        this.renderTileEntityAt((TileEntityZeldaPot)p_147500_1_, p_147500_2_, p_147500_4_, p_147500_6_, p_147500_8_);
    }
}

 

I mean, I'm not THAT bothered, because, apart from maybe slowing it down a bit, it's causing no real problems, but for the sake of it being done properly, I would like to know what's causing or what I did wrong. Or if it's not something I did and it's because of something else.

 

Posted

If your using forge version 1057, you ned to downgrade to 1056 or upgrade to 1058 or higher. 1057 has some major bugs in it, so you shouldn't be using it.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

Why are you binding texture before initing open gl? I mean you should first init open gl with GL11.glPushMatrix and then do staff you want to do in your render...

Posted

*shrugs* it's how it's done in the TileEntityEnderChestRenderer and the texture is working fine

 

I'm not great at renders, but it seems to be working

 

Apart from the aforementioned error of course

Posted

Why are you binding texture before initing open gl? I mean you should first init open gl with GL11.glPushMatrix and then do staff you want to do in your render...

 

You actually know what glPushMatrix does? It surely doesn't "init OpenGL".

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted

Why are you binding texture before initing open gl? I mean you should first init open gl with GL11.glPushMatrix and then do staff you want to do in your render...

 

You actually know what glPushMatrix does? It surely doesn't "init OpenGL".

 

Yes I know it doesn't actually "init" openGL, it saves current matrix right? I just thought it's easier to understand that way...

Posted

Why are you binding texture before initing open gl? I mean you should first init open gl with GL11.glPushMatrix and then do staff you want to do in your render...

 

You actually know what glPushMatrix does? It surely doesn't "init OpenGL".

 

Yes I know it doesn't actually "init" openGL, it saves current matrix right? I just thought it's easier to understand that way...

 

It pushes the current matrix up the stack. It should always be paired with glPopMatrix, which takes the topmost matrix away and the matrix below becomes the topmost one. Example:

glTranslatef(...);    // translates the current matrix (#1)
glPushMatrix();       // pushes current matrix up, previous translation still in effect
glTranslatef(...);    // translates the current matrix (#2)
renderStuff();        // renders stuff with translation #1 and #2
glPopMatrix();        // pops the current matrix, translation #2 is not in effect anymore, #1 still is
renderMoreStuff();    // renders stuff with translation #1

http://www.opengl.org/sdk/docs/man2/xhtml/glPushMatrix.xml

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

  • 3 months later...
Posted

User was banned for hijacking a old thread and for not reading the EAQ.

Getting tired of this -.-

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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