aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2023-08-19 13:25:11 +0200
committerGitHub <noreply@github.com>2023-08-19 13:25:11 +0200
commit672c0521f0f5cdd84d7e24ac8d1a7343092e63c3 (patch)
tree963811bfb3d3bb92525a0753d1cfbff8b6e2eb29 /src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
parenta9cfc1db8d5a9436a0c3def82492fcf0d66240c4 (diff)
downloadskyhanni-672c0521f0f5cdd84d7e24ac8d1a7343092e63c3.tar.gz
skyhanni-672c0521f0f5cdd84d7e24ac8d1a7343092e63c3.tar.bz2
skyhanni-672c0521f0f5cdd84d7e24ac8d1a7343092e63c3.zip
Merge pull request #387
* Add more z-indexing
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
index 672b26743..0150e7311 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
@@ -35,11 +35,10 @@ object RenderUtils {
}
infix fun Slot.highlight(color: Color) {
- val lightingState = GL11.glIsEnabled(GL11.GL_LIGHTING)
-
- GlStateManager.disableLighting()
GlStateManager.color(1f, 1f, 1f, 1f)
-
+ GlStateManager.pushAttrib()
+ GL11.glDisable(GL11.GL_LIGHTING)
+ GL11.glEnable(GL11.GL_DEPTH_TEST)
GlStateManager.pushMatrix()
// TODO don't use z
GlStateManager.translate(0f, 0f, 110 + Minecraft.getMinecraft().renderItem.zLevel)
@@ -51,8 +50,7 @@ object RenderUtils {
color.rgb
)
GlStateManager.popMatrix()
-
- if (lightingState) GlStateManager.enableLighting()
+ GlStateManager.popAttrib()
}
fun RenderWorldLastEvent.drawColor(