Imgui in minecraft yields nondeterministic rendering issues
See original GitHub issueThis might be related to #112, #99 or #96. My setup is comparable to all three issues.
Setup
build.gradle
: To work around #112, the fix mentioned in that thread are being used: The rest of the file is omitted for brevity.
compile "com.github.kotlin-graphics:imgui:-SNAPSHOT"
compile 'com.github.kotlin-graphics:uno-sdk:f528113bf45e43406953d6881915467d85a20881'
compile 'com.github.kotlin-graphics.glm:glm:1b4ac18dd1a3c23440d3f33596688aac60bc0141'
compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: '1.3.61'
MinecraftScreen.java
: The minecraft screen (GUI) (see #99 examples, and the example on the wiki) Source code
Problem
Imgui’s rendering screws up randomly, depending on at what time implGl3 = new ImplGL3();
(in MinecraftScreen
) is called.
Sometimes it renders just fine:
Sometimes it doesn’t render at all.
Sometimes it only draws some glyphs, varying in readability: More readable:
Sometimes all text gets cut off slightly.
How the rendering screws up depends on the current instance of ImplGL3
.
Each time the player invokes a command causing MinecraftScreen#reload
(this method) to be invoked (thus, creating a new instance of ImplGl3
), the rendering changes, randomly, to any of the above.
I’m assuming this has something to do with the openGL state imgui sets up for itself. Changing the GL state before any call to implGl3.renderDrawData
does not affect how the windows are drawn.
Sorry for opening all of these issues! Thanks for your continued help.
Issue Analytics
- State:
- Created 4 years ago
- Comments:19
Top GitHub Comments
I’ve managed to avoid both the crashes and rendering issues by initializing ImplGL3 right after the Minecraft window is created in WindowProvider::createWindow.
Nice, let’s keep this open still for a while and if there wont be still any crashe, we’ll consider it resolved