diff --git a/src/main/java/gg/essential/universal/UGraphics.java b/src/main/java/gg/essential/universal/UGraphics.java index cef41da..53558a5 100644 --- a/src/main/java/gg/essential/universal/UGraphics.java +++ b/src/main/java/gg/essential/universal/UGraphics.java @@ -387,11 +387,19 @@ public static void enableAlpha() { public static void configureTexture(int glTextureId, Runnable block) { int prevTextureBinding = GL11.glGetInteger(GL_TEXTURE_BINDING_2D); - bindTexture(glTextureId); + //#if STANDALONE + //$$ glBindTexture(GL_TEXTURE_2D, glTextureId); + //#else + GlStateManager.bindTexture(glTextureId); + //#endif block.run(); - bindTexture(prevTextureBinding); + //#if STANDALONE + //$$ glBindTexture(GL_TEXTURE_2D, prevTextureBinding); + //#else + GlStateManager.bindTexture(prevTextureBinding); + //#endif } public static void configureTextureUnit(int index, Runnable block) {