1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-02 06:32:59 +00:00

Use the VBO monitor renderer by default

Historically, the VBO was an order of magnitude slower than the TBO
renderer. However, as of fccca22d3f, the
difference is much smaller now. While TBOs /are/ still faster, this only
has a measurable impact in extreme stress tests, and so isn't worth the
occasional issues which occur.

I'm still keeping the code around for now: I'm incredibly fond of it,
even three years later. I may end up re-evaluating this the next time
Minecraft's rendering code changes :D.

This also adds a line to the debug screen showing the current monitor
renderer, though maybe less useful now that almost everyone will be
using VBOs!
This commit is contained in:
Jonathan Coates
2023-02-17 08:42:29 +00:00
parent 53619a64b5
commit a5bda7454a
8 changed files with 35 additions and 71 deletions

View File

@@ -30,11 +30,6 @@ public class IrisShaderMod implements ShaderMod.Provider {
return IrisApi.getInstance().isRenderingShadowPass();
}
@Override
public boolean isShaderMod() {
return true;
}
@Override
public DirectFixedWidthFontRenderer.QuadEmitter getQuadEmitter(int vertexCount, IntFunction<ByteBuffer> makeBuffer) {
return IrisApi.getInstance().getMinorApiRevision() >= 1

View File

@@ -18,7 +18,13 @@ import java.util.List;
class DebugScreenOverlayMixin {
@Inject(method = "getSystemInformation", at = @At("RETURN"))
@SuppressWarnings("UnusedMethod")
private void appendDebugInfo(CallbackInfoReturnable<List<String>> cir) {
ClientHooks.addDebugInfo(cir.getReturnValue()::add);
private void appendBlockDebugInfo(CallbackInfoReturnable<List<String>> cir) {
ClientHooks.addBlockDebugInfo(cir.getReturnValue()::add);
}
@Inject(method = "getGameInformation", at = @At("RETURN"))
@SuppressWarnings("UnusedMethod")
private void appendGameDebugInfo(CallbackInfoReturnable<List<String>> cir) {
ClientHooks.addGameDebugInfo(cir.getReturnValue()::add);
}
}