OpenBlocks

OpenBlocks

56M Downloads

Tank Liquids incorrect rendering from different Angles

kaerns opened this issue ยท 5 comments

commented

Versions:
OpenBlocks-1.10.2-1.6-1.10.X-snapshot-48
OpenModsLib-1.10.2-0.10-1.10.X-snapshot-45
1.10.2-forge1.10.2-12.18.3.2185

Test-liquids are UU-Matter from IC2 and Sludge from MineFactory Reloaded

normal view Facing South/East
http://i.imgur.com/3G7EOzu.png

bugged view facing West/Noth (positive y-rotation/pitch)
http://i.imgur.com/3G7EOzu.png

commented

Please test in empty world, it looks like OpenGL state leak caused by other TileEntity.

Also, rendering is also bugged on first image, due to MinecraftForge/MinecraftForge#3900

commented

seems to work fine in an "empty" world (superflat with just 1 layer bedrock)
did a quick test and found the problem: its the forcefield from malisis doors. when its in the view-range it looks like the second picture, otherwhise it looks like the first.

commented

Though I have no idea what leaks. Normally I would guess it's blend func, but that seems to be set before rendering of tank quads (TileEntityRendererDispatcher.drawBatch):

GlStateManager.blendFunc(org.lwjgl.opengl.GL11.GL_SRC_ALPHA, org.lwjgl.opengl.GL11.GL_ONE_MINUS_SRC_ALPHA);
GlStateManager.enableBlend();
GlStateManager.disableCull();

I don't have way to fix it on my side, since I'm using FastTESR, so I'm closing this issue.

commented

Turns out the issue comes from actually using the GlStateManager. The rendering was wrapped into GlStateManager.push/popAttrib but that doesn't handle all the bits.