okay the synchronized functions didn't actually fix it

but now we actually benefit from the tile entity render filtering, another 2x ish performance
This commit is contained in:
JozsefA 2021-01-24 01:07:22 -08:00
parent 59e29ac958
commit f05497a28c
3 changed files with 2 additions and 11 deletions

View File

@ -35,11 +35,6 @@ public class KineticTileEntityRenderer extends SafeTileEntityRenderer<KineticTil
super(dispatcher);
}
@Override
public boolean isGlobalRenderer(KineticTileEntity te) {
return true;
}
@Override
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
int light, int overlay) {

View File

@ -38,11 +38,6 @@ public class BeltRenderer extends SafeTileEntityRenderer<BeltTileEntity> impleme
super(dispatcher);
}
@Override
public boolean isGlobalRenderer(BeltTileEntity te) {
return BeltBlock.canTransportObjects(te.getBlockState());
}
@Override
protected void renderSafe(BeltTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
int light, int overlay) {

View File

@ -178,12 +178,13 @@ public class LightVolume {
GL11.glTexParameteri(GL13.GL_TEXTURE_3D, GL13.GL_TEXTURE_WRAP_T, GL20.GL_MIRRORED_REPEAT);
if (bufferDirty) {
uploadTexture();
bufferDirty = false;
}
}
private synchronized void uploadTexture() {
lightData.rewind();
GL12.glTexImage3D(GL12.GL_TEXTURE_3D, 0, GL40.GL_RG8, textureVolume.sizeX(), textureVolume.sizeY(), textureVolume.sizeZ(), 0, GL40.GL_RG, GL40.GL_UNSIGNED_BYTE, lightData);
bufferDirty = false;
}
public void release() {