Change GL_TEXTURE_15 to GL_TEXTURE_0 with a config option on top.

This commit is contained in:
Vasco Lavos committed 2015-11-10 19:57:20 +00:00
1 parent 4058e85266
commit a9aed4c7c5
2 files changed
+7 -2

No files matched your search

@@ -26,6 +26,7 @@ import vazkii.botania.client.core.helper.RenderHelper;
import vazkii.botania.client.core.helper.ShaderHelper;
import vazkii.botania.client.gui.lexicon.GuiLexicon;
import vazkii.botania.client.lib.LibResources;
import vazkii.botania.common.core.handler.ConfigHandler;
public class GuiButtonCategory extends GuiButtonLexicon {
@@ -46,10 +47,10 @@ public class GuiButtonCategory extends GuiButtonLexicon {
GL11.glBindTexture(GL11.GL_TEXTURE_2D, r.getTexture(resource).getGlTextureId());
ARBShaderObjects.glUniform1iARB(imageUniform, 0);
GL13.glActiveTexture(ARBMultitexture.GL_TEXTURE15_ARB);
GL13.glActiveTexture(ARBMultitexture.GL_TEXTURE0_ARB + ConfigHandler.glSecondaryTextureUnit);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glBindTexture(GL11.GL_TEXTURE_2D, r.getTexture(stencilResource).getGlTextureId());
ARBShaderObjects.glUniform1iARB(maskUniform, 15);
ARBShaderObjects.glUniform1iARB(maskUniform, ConfigHandler.glSecondaryTextureUnit);
ARBShaderObjects.glUniform1fARB(heightMatchUniform, heightMatch);
GL13.glActiveTexture(ARBMultitexture.GL_TEXTURE0_ARB);
@@ -49,6 +49,7 @@ public final class ConfigHandler {
public static boolean enableSeasonalFeatures = true;
public static boolean useShiftForQuickLookup = false;
public static int manaBarHeight = 29;
public static int glSecondaryTextureUnit = 7;
public static boolean altFlowerTextures = false;
public static boolean matrixMode = false;
@@ -154,6 +155,9 @@ public final class ConfigHandler {
desc = "The height of the mana display bar in above the XP bar. You can change this if you have a mod that changes where the XP bar is.";
manaBarHeight = loadPropInt("manaBar.height", desc, manaBarHeight);
desc = "The GL Texture Unit to use for the secondary sampler passed in to the Lexica Botania's category button shader. DO NOT TOUCH THIS IF YOU DON'T KNOW WHAT YOU'RE DOING";
glSecondaryTextureUnit = loadPropInt("shaders.secondaryUnit", desc, glSecondaryTextureUnit);
desc = "Set this to true to use alternate flower textures by Futureazoo, not all flowers are textured. http://redd.it/2b3o3f";
altFlowerTextures = loadPropBool("flowerTextures.alt", desc, altFlowerTextures);