Logistics Pipes

Logistics Pipes

13M Downloads

OpenGL 1281 Error when rendering fluids with no block

diamondq opened this issue ยท 6 comments

commented

Occurs in v0.9.3.70 on the stable-bc7 branch:

The code in LogisticsRenderPipe does a null check and bails if there is no "base block" associated with a liquid.

https://github.com/RS485/LogisticsPipes/blob/stable-bc7/common/logisticspipes/renderer/LogisticsRenderPipe.java#L601

Unfortunately, a number of mods (Mekanism is a prime example), don't provide a block for some of their liquids. While I agree that these mods should be fixed as well, the null check exiting the initialization of the DisplayFluidList, causes the display list to not be properly set up, and then when it attempts to render a liquid (in renderFluids) it calls the glCallList with a undefined display list, and you get a 1281 error.

My suggestion would be to put the null check in earlier, and if the fluid.getBlock() returns null, then leave the RenderInfo.baseBlock pointing to the default value of sand (at least it's something to draw). This should allow the DisplayFluidList to be built with some display list values, and a later call to render them will work.

Otherwise, depending on your environment, it can lock up the client thread completely, and it effectively creates a dead zone that causes any client to hang if they enter the render distance of a LogisticsPipe transferring such a liquid (I originally found it attempting to transfer Brine from an Mekanism Solar Evaporation Tower).

Cheers

commented

The authors of these mods have their reasons to not add a fluid block to their fluid and other mods that add pipes, tanks, etc can handle that without problems.

commented

Agree. Check how BC and ThermalDynamics gets the texture of the fluid. I think it's something like this

commented

I get this constantly since I encountered #891. Is there a config option somewhere I can use to squelch the constant error message in the chat window?

commented

I don't think so, but if you move to other solution that does not trigger the error, it will be stop appearing. Maybe after a reload. I know this is not optimal, but these error messages should be pop up. But I think developers would be happy if you send an another issue with feature request to rate limit these messages.

commented

Im not sure but in the logistics pipe config is an option to render all pipes opaque. (new renderer have to be turned off via the logistics pipe controller)
Then the the fluids shouldnt be rendered at all???
Will this "fix" this error?

commented