Skip to content

Issue #65 - Fix rendering glitches during startup#67

Merged
jbrd merged 1 commit intomainfrom
render-glitch-fixes
Dec 6, 2025
Merged

Issue #65 - Fix rendering glitches during startup#67
jbrd merged 1 commit intomainfrom
render-glitch-fixes

Conversation

@jbrd
Copy link
Owner

@jbrd jbrd commented Dec 6, 2025

The way in which the plug-in handled changes to display scale and texture format was allowing draw data constructed from the old settings to be rendered using the new settings, despite it being incompatible.

To fix this, during the extract stage, we now drop the incompatible draw data when we detect a change in display settings, and re-create a renderer for the next frame only. This guarantees that the draw data for a context is only ever rendered by a compatible renderer.

In implementing this, the context and render context has been cleaned up, where all of the state required to keep track of this has now been moved from the render context into the game-thread context, and factored inside a ImguiExtractState struct.

Also took the opportunity to do a bit of spring cleaning:

  • Types all now use Imgui rather than a mixture of that and ImGui
  • Changed variable naming to consistently use imgui_context and render_context to make it easier to understand the types

The way in which the plug-in handled changes to display scale and
texture format was allowing draw data constructed from the old settings
to be rendered using the new settings, despite it being incompatible.

To fix this, during the extract stage, we now drop the incompatible draw
data when we detect a change in display settings, and re-create a
renderer for the next frame only. This guarantees that the draw data for
a context is only ever rendered by a compatible renderer.

In implementing this, the context and render context has been cleaned
up, where all of the state required to keep track of this has now been
moved from the render context into the game-thread context, and factored
inside a ImguiExtractState struct.

Also took the opportunity to do a bit of spring cleaning:

- Types all now use 'Imgui' rather than a mixture of that and 'ImGui'
- Changed variable naming to consistently use `imgui_context` and
  `render_context` to make it easier to understand the types
@jbrd jbrd merged commit 8b615f7 into main Dec 6, 2025
1 check passed
@jbrd jbrd deleted the render-glitch-fixes branch December 6, 2025 13:44
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

Successfully merging this pull request may close these issues.

1 participant