mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-16 09:33:42 +01:00
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:
parent
59e29ac958
commit
f05497a28c
3 changed files with 2 additions and 11 deletions
|
@ -35,11 +35,6 @@ public class KineticTileEntityRenderer extends SafeTileEntityRenderer<KineticTil
|
||||||
super(dispatcher);
|
super(dispatcher);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isGlobalRenderer(KineticTileEntity te) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
||||||
int light, int overlay) {
|
int light, int overlay) {
|
||||||
|
|
|
@ -37,11 +37,6 @@ public class BeltRenderer extends SafeTileEntityRenderer<BeltTileEntity> impleme
|
||||||
public BeltRenderer(TileEntityRendererDispatcher dispatcher) {
|
public BeltRenderer(TileEntityRendererDispatcher dispatcher) {
|
||||||
super(dispatcher);
|
super(dispatcher);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isGlobalRenderer(BeltTileEntity te) {
|
|
||||||
return BeltBlock.canTransportObjects(te.getBlockState());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderSafe(BeltTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
protected void renderSafe(BeltTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
||||||
|
|
|
@ -178,12 +178,13 @@ public class LightVolume {
|
||||||
GL11.glTexParameteri(GL13.GL_TEXTURE_3D, GL13.GL_TEXTURE_WRAP_T, GL20.GL_MIRRORED_REPEAT);
|
GL11.glTexParameteri(GL13.GL_TEXTURE_3D, GL13.GL_TEXTURE_WRAP_T, GL20.GL_MIRRORED_REPEAT);
|
||||||
if (bufferDirty) {
|
if (bufferDirty) {
|
||||||
uploadTexture();
|
uploadTexture();
|
||||||
bufferDirty = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void uploadTexture() {
|
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);
|
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() {
|
public void release() {
|
||||||
|
|
Loading…
Reference in a new issue