Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering artifacts on non-square elements #191

Closed
doceazedo opened this issue Sep 6, 2023 · 1 comment
Closed

Rendering artifacts on non-square elements #191

doceazedo opened this issue Sep 6, 2023 · 1 comment

Comments

@doceazedo
Copy link
Collaborator

doceazedo commented Sep 6, 2023

Everything that is not a square, such as most of the stuff on the demo custom rendering window, roundings and tabs are rendering with very weird, distorted artifacts:

CleanShot 2023-09-06 at 12 57 02@2x

Some other artifacts are also appearing depending on the options:

CleanShot.2023-09-06.at.12.57.52-converted.mp4

I didn't do anything fancy for the setup (note this is a Minecraft mod running on a Apple M1 Max, macOS 13.0.1):

object ImGui {
    val instance = ImGui
    val implGl3: ImplGL3
    val implGlfw: ImplGlfw

    init {
        MINECRAFT_BEHAVIORS = true

        val glfwWindow = GlfwWindow(MinecraftClient.getInstance().window.handle)
        val window = GlWindow(glfwWindow, Caps.Profile.COMPATIBILITY, true)

        window.makeCurrent(true)
        Context().setCurrent()

        implGlfw = ImplGlfw(window, false, null)
        implGl3 = ImplGL3()
    }
}
@Environment(EnvType.CLIENT)
open class ImGuiScreen(title: Text) : Screen(title) {
    override fun render(context: DrawContext?, mouseX: Int, mouseY: Int, delta: Float) {
        ImGui.implGl3.newFrame()
        ImGui.implGlfw.newFrame()
        ImGui.instance.newFrame()
        
        ImGui.instance.showDemoWindow(booleanArrayOf(true))
        
        ImGui.instance.render()
        ImGui.implGl3.renderDrawData(
            Objects.requireNonNull<DrawData>(ImGui.instance.drawData)
        )
    }
}

Any hints on how I can solve this?

elect86 added a commit that referenced this issue Sep 7, 2023
This commit adjusts the indentation to improve the readability of the code across several files in the project. The changes within DrawList.kt primarily involve updating the indentation for multiple function calls and block of codes. Also, in 'drawList support.kt', the calculation for the variable 'a' has been corrected by replacing the hard-coded value with the constant DRAWLIST_ARCFAST_TABLE_SIZE.

#191
@elect86
Copy link
Collaborator

elect86 commented Sep 7, 2023

Thanks for reporting

I got on the private test suite almost 300 tests, but that wasn't included.

It should be fixed now, fetch 1.89.7-1 and reopen this issue if it's still there

@elect86 elect86 closed this as completed Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants