Skip to content

Commit 93a2d59

Browse files
committed
Revert "it works!"
This reverts commit 0aee1ee.
1 parent d8ecbf3 commit 93a2d59

File tree

2 files changed

+0
-12
lines changed
  • minecraft/src/main/java/org/polyfrost/oneconfig/api/ui/v1/internal/wrappers
  • modules/ui/src/main/kotlin/org/polyfrost/oneconfig/api/ui/v1/internal

2 files changed

+0
-12
lines changed

minecraft/src/main/java/org/polyfrost/oneconfig/api/ui/v1/internal/wrappers/PolyUIScreen.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,6 @@ public void onRender(@NotNull OmniRenderingContext ctx, int mouseX, int mouseY,
126126
}
127127

128128
try {
129-
// asm: we need to bind the main framebuffer on 1.21.5+ because for some reason mc unbinds it right before... whatever
130-
//#if MC >= 1.21.5
131-
//$$ kotlin.jvm.functions.Function0<kotlin.Unit> unbind = dev.deftu.omnicore.api.client.framebuffer.OmniFramebuffers.getMain().bind();
132-
//#endif
133129
((Buffer) VIEWPORT).clear();
134130
//#if MC >= 1.13
135131
//$$ glGetIntegerv(GL_VIEWPORT, VIEWPORT);
@@ -143,9 +139,6 @@ public void onRender(@NotNull OmniRenderingContext ctx, int mouseX, int mouseY,
143139
glViewport(x, y, w, h);
144140
polyUI.render();
145141
glViewport(VIEWPORT.get(), VIEWPORT.get(), VIEWPORT.get(), VIEWPORT.get());
146-
//#if MC >= 1.21.5
147-
//$$ unbind.invoke();
148-
//#endif
149142
} catch (Exception e) {
150143
polyUI.getRenderer().endFrame();
151144
death(e);

modules/ui/src/main/kotlin/org/polyfrost/oneconfig/api/ui/v1/internal/GLRendererImpl.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,6 @@ class GLRendererImpl(private val nsvg: NanoSvgApi, private val stb: StbApi) : Re
407407
val prevProg = glGetInteger(GL_CURRENT_PROGRAM)
408408
val prevBuf = glGetInteger(GL_ARRAY_BUFFER_BINDING)
409409
val prevBlend = glGetBoolean(GL_BLEND)
410-
val prevBlendSrcRgb = glGetInteger(GL_BLEND_SRC_RGB)
411-
val prevBlendDstRgb = glGetInteger(GL_BLEND_DST_RGB)
412-
val prevBlendSrcAlpha = glGetInteger(GL_BLEND_SRC_ALPHA)
413-
val prevBlendDstAlpha = glGetInteger(GL_BLEND_DST_ALPHA)
414410
val prevDepth = glGetBoolean(GL_DEPTH_TEST)
415411
val prevCull = glGetBoolean(GL_CULL_FACE)
416412
glEnable(GL_BLEND)
@@ -454,7 +450,6 @@ class GLRendererImpl(private val nsvg: NanoSvgApi, private val stb: StbApi) : Re
454450
count = 0
455451
buffer.clear()
456452
if (!prevBlend) glDisable(GL_BLEND)
457-
glBlendFuncSeparate(prevBlendSrcRgb, prevBlendDstRgb, prevBlendSrcAlpha, prevBlendDstAlpha)
458453
if (prevDepth) glEnable(GL_DEPTH_TEST)
459454
if (prevCull) glEnable(GL_CULL_FACE)
460455
glUseProgram(prevProg)

0 commit comments

Comments
 (0)