diff options
author | Linnea Gräf <nea@nea.moe> | 2023-08-19 13:25:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-19 13:25:11 +0200 |
commit | 672c0521f0f5cdd84d7e24ac8d1a7343092e63c3 (patch) | |
tree | 963811bfb3d3bb92525a0753d1cfbff8b6e2eb29 /src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt | |
parent | a9cfc1db8d5a9436a0c3def82492fcf0d66240c4 (diff) | |
download | skyhanni-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.kt | 10 |
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( |