From 9a67f7d5cda2b9d8a06179f12133bd34b5b8f1c3 Mon Sep 17 00:00:00 2001 From: miozune Date: Wed, 22 Nov 2023 21:57:55 +0900 Subject: [PATCH] Fix lighting for some drawables (#56) --- .../com/gtnewhorizons/modularui/api/drawable/shapes/Circle.java | 1 + .../gtnewhorizons/modularui/api/drawable/shapes/Rectangle.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/java/com/gtnewhorizons/modularui/api/drawable/shapes/Circle.java b/src/main/java/com/gtnewhorizons/modularui/api/drawable/shapes/Circle.java index 4b6d750..40c4f3f 100644 --- a/src/main/java/com/gtnewhorizons/modularui/api/drawable/shapes/Circle.java +++ b/src/main/java/com/gtnewhorizons/modularui/api/drawable/shapes/Circle.java @@ -55,6 +55,7 @@ public void draw(float x0, float y0, float width, float height, float partialTic GlStateManager.disableTexture2D(); GlStateManager.enableBlend(); GlStateManager.enableAlpha(); + GlStateManager.disableLighting(); GlStateManager.tryBlendFuncSeparate( GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, diff --git a/src/main/java/com/gtnewhorizons/modularui/api/drawable/shapes/Rectangle.java b/src/main/java/com/gtnewhorizons/modularui/api/drawable/shapes/Rectangle.java index b8d92a8..27abb6a 100644 --- a/src/main/java/com/gtnewhorizons/modularui/api/drawable/shapes/Rectangle.java +++ b/src/main/java/com/gtnewhorizons/modularui/api/drawable/shapes/Rectangle.java @@ -65,6 +65,7 @@ public void draw(float x0, float y0, float width, float height, float partialTic GlStateManager.disableTexture2D(); GlStateManager.enableBlend(); GlStateManager.enableAlpha(); + GlStateManager.disableLighting(); GlStateManager.tryBlendFuncSeparate( GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA,