diff options
author | inglettronald <inglettronald@gmail.com> | 2023-06-11 22:57:55 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-06-11 22:57:55 -0500 |
commit | 8ade4e173a03fcb3080025d11c6e51f5976f3ccc (patch) | |
tree | 2adce93925feb17af340dfb53bc79f6bd159a2ca /src/main/kotlin/com/dulkirfabric/util/WorldRenderUtils.kt | |
parent | a30fcadbeed2997ad1607d488ba7548c799a6033 (diff) | |
download | DulkirMod-Fabric-8ade4e173a03fcb3080025d11c6e51f5976f3ccc.tar.gz DulkirMod-Fabric-8ade4e173a03fcb3080025d11c6e51f5976f3ccc.tar.bz2 DulkirMod-Fabric-8ade4e173a03fcb3080025d11c6e51f5976f3ccc.zip |
wip
Diffstat (limited to 'src/main/kotlin/com/dulkirfabric/util/WorldRenderUtils.kt')
-rw-r--r-- | src/main/kotlin/com/dulkirfabric/util/WorldRenderUtils.kt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/util/WorldRenderUtils.kt b/src/main/kotlin/com/dulkirfabric/util/WorldRenderUtils.kt index d5008ba..f5daccf 100644 --- a/src/main/kotlin/com/dulkirfabric/util/WorldRenderUtils.kt +++ b/src/main/kotlin/com/dulkirfabric/util/WorldRenderUtils.kt @@ -1,17 +1,14 @@ package com.dulkirfabric.util import com.mojang.blaze3d.platform.GlConst -import com.mojang.blaze3d.platform.GlStateManager import com.mojang.blaze3d.systems.RenderSystem import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext import net.minecraft.client.render.BufferBuilder import net.minecraft.client.render.GameRenderer -import net.minecraft.client.render.Tessellator import net.minecraft.client.render.VertexFormat import net.minecraft.client.render.VertexFormats import net.minecraft.client.util.math.MatrixStack import net.minecraft.util.math.Box -import net.minecraft.util.math.Direction.Axis import org.joml.Vector3f import java.awt.Color @@ -48,10 +45,11 @@ object WorldRenderUtils { ) { val matrices = context.matrixStack() matrices.push() + val prevShader = RenderSystem.getShader() RenderSystem.setShader(GameRenderer::getRenderTypeLinesProgram) RenderSystem.disableBlend() RenderSystem.disableCull() - RenderSystem.defaultBlendFunc() + // RenderSystem.defaultBlendFunc() RenderSystem.lineWidth(thickness) RenderSystem.setShaderColor(color.red / 255f, color.green / 255f, color.blue / 255f, color.alpha / 255f) if (!depthTest) { @@ -92,10 +90,12 @@ object WorldRenderUtils { RenderSystem.enableDepthTest() - RenderSystem.disableBlend() + RenderSystem.enableBlend() RenderSystem.setShaderColor( 1f, 1f, 1f, 1f ) + RenderSystem.setShader { prevShader } + RenderSystem.enableCull() matrices.pop() } }
\ No newline at end of file |