Holding CTRL+SHIFT on the F3 menu now shows the OpenGL context and relevant config settings. A step in finding the problem in #1533

This commit is contained in:
Vasco Lavos committed 2015-11-11 19:55:06 +00:00
1 parent 1414596641
commit d32a5b17c5
1 file changed
+30 -1
@@ -11,11 +11,21 @@
package vazkii.botania.client.core.handler;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import org.lwjgl.opengl.ARBFragmentShader;
import org.lwjgl.opengl.ContextCapabilities;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL20;
import org.lwjgl.opengl.GLContext;
import vazkii.botania.client.fx.ParticleRenderDispatcher;
import vazkii.botania.common.core.handler.ConfigHandler;
import vazkii.botania.common.core.handler.ManaNetworkHandler;
import vazkii.botania.common.lib.LibMisc;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
public final class DebugHandler {
@@ -27,8 +37,27 @@ public final class DebugHandler {
World world = Minecraft.getMinecraft().theWorld;
if(Minecraft.getMinecraft().gameSettings.showDebugInfo) {
event.left.add(null);
String version = LibMisc.VERSION;
if(version.contains("GRADLE"))
version = "N/A";
event.left.add(PREFIX + "pS: " + ParticleRenderDispatcher.sparkleFxCount + ", pFS: " + ParticleRenderDispatcher.fakeSparkleFxCount + ", pW: " + ParticleRenderDispatcher.wispFxCount + ", pDIW: " + ParticleRenderDispatcher.depthIgnoringWispFxCount + ", pLB: " + ParticleRenderDispatcher.lightningCount);
event.left.add(PREFIX + "netColl: " + ManaNetworkHandler.instance.getAllCollectorsInWorld(world).size() + ", netPool: " + ManaNetworkHandler.instance.getAllPoolsInWorld(world).size());
event.left.add(PREFIX + "netColl: " + ManaNetworkHandler.instance.getAllCollectorsInWorld(world).size() + ", netPool: " + ManaNetworkHandler.instance.getAllPoolsInWorld(world).size() + ", rv: " + version);
if(GuiScreen.isCtrlKeyDown() && GuiScreen.isShiftKeyDown()) {
event.left.add(PREFIX + "ConfigContext");
event.left.add(" shaders.enabled: " + ConfigHandler.useShaders);
event.left.add(" shaders.secondaryUnit: " + ConfigHandler.glSecondaryTextureUnit);
ContextCapabilities caps = GLContext.getCapabilities();
event.left.add(PREFIX + "OpenGLContext");
event.left.add(" GL_VERSION: " + GL11.glGetString(GL11.GL_VERSION));
event.left.add(" GL_RENDERER: " + GL11.glGetString(GL11.GL_RENDERER));
event.left.add(" GL_SHADING_LANGUAGE_VERSION: " + GL11.glGetString(GL20.GL_SHADING_LANGUAGE_VERSION));
event.left.add(" GL_MAX_TEXTURE_IMAGE_UNITS_ARB: " + GL11.glGetInteger(ARBFragmentShader.GL_MAX_TEXTURE_IMAGE_UNITS_ARB));
event.left.add(" GL_ARB_multitexture: " + caps.GL_ARB_multitexture);
event.left.add(" GL_ARB_texture_non_power_of_two: " + caps.GL_ARB_texture_non_power_of_two);
}
}
}