Not Enough Items 1.8.+

Not Enough Items 1.8.+

16M Downloads

NEI setting incorrect GL flags post chunk overlay render

Opened this issue ยท 9 comments

commented

I found an compatability issue with Lunatrius Laser Levels mod, where the color of the laser level build guides dissapears to near invisibility if I press F9 to toggle NEI's chunk grid. I reported this problem in their topic and they said:

"As for the bug, the grid/chunk border renderer is setting some OpenGL state and it's not resetting it to the previous, expected value. Mods should always try to revert any OGL changes to ensure maximum compatibility with other mods."

For reference, here is my initial report of that issue, complete with screenshots, and in the posts after that Lunatrius has replied including the quote above. I hope that this info can help you guys find out what goes wrong here and I hope that you can fix it!

commented

I don't know I just passed the message by Lunatrius on here, all I know is that this only happens with NEI's chunk grid involved. I will post this back in the NEI thread though, maybe that will help get the exact error clear!

commented

Ill look in to it, mind a screenshot of what is broken?

commented

Here are the two screenshots that I posted in a spoiler tag in the reply that I linked to above:

This is how the laser levels should look:
Screenshot

This is how they look after I activated the chunk grid:
Screenshot

The only way to get the original color back is by relogging or restarting minecraft, turning off the chunk grid doesn't help. But I wanted to use both, so that didn't help much either.

commented

Ok, NEI first disables Texture2d, enables blend, sets blendFunc to srcAlpha and oneMinusSrcAlpha, disabled lighting, at the end of the draw call it enables lighting disables blend then enables texture2d. unless you are just assuming the correct blendfunc is applied it might be on your end.

commented

After going through the code, it most likely wasn't a faulty state. I had a similar issue with InGame Info XML a while ago, when the color wasn't reset back to (1, 1, 1, 1), tinting the text a different color (whatever rendered before it). Should be fixed on my end Lunatrius/Laser-Level@efc680e

commented

I just tried the newer version, and I saw a difference in color. The guides are now much less transparent, and still turn gray when pressing f9. So it seems that it hasn't been fixed (completely) yet.

Screenshots:
2016-10-16_22 36 54
2016-10-16_22 37 05

commented

Fixed the fix and as it turns out NEI enables lighting (it's disabled in vanilla/forge when the event is fired).

It's worth looking into this - this call might be one of the reasons why the sky and/or some items in the old NEI overlay used to flicker when you tried to interact with NEI.

commented

Ahhhh, i see. Ill work on some stuff to fix it. Possibly a way to push and pop specific GL states.

commented

Please verify with the latest versions of NEI from CB's site.