Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Graphics: surface loss and restore in the renderer

Closed
#246 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp

Research direction

Start with Renderer.cs:256-284 and trace the surface and swapchain lifecycle through the host event handling and Device.Dispose; the issue also depends on #245. Implement the listed loss, restore, resize, and disposal behavior, then verify that Linux passes 100 minimize and restore cycles without validation errors and that recreation has no busy-wait.

Written by the indexing model from the issue text.

Description

c:graphics p:high size:L t:feature

Current State

The surface is never destroyed or recreated. Renderer.RecreateSwapChain (Renderer.cs:256-284) busy-waits on window.DoEvents() until the framebuffer is non-zero and throws if formats change; framebufferResized is never set; oldSwapchain is always null; Device.Dispose destroys neither surface nor instance. On Android the surface disappears on every pause.

Tasks

  • On surface lost: wait idle, destroy swapchain and surface, pause ticking, stop rendering
  • On surface restored: recreate surface and swapchain; rebuild render pass and pipelines if the format changed
  • Pass oldSwapchain on recreation; set the resize flag from host events
  • Destroy surface and instance on dispose
  • Desktop stress test: minimize/restore and resize

Acceptance Criteria

  • 100 minimize/restore cycles validation-clean on Linux
  • No busy-wait remains

Related

  • Android plan task A10 · seniority Sr · mergeable now (.NET 10)
  • Depends on: #245
  • Platform roadmap: #100
Dominant language
C#
Stars
1
Forks
1
Avg merge
1h 45m
Merged PRs (30d)
31

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MASS4ORG/Turian

All issues in MASS4ORG/Turian

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.