Skip to content

Modernize the graphics pipeline: legacy OpenGL -> Qt RHI #621

Description

@aalex

Summary

Migrate MapMap's rendering from legacy (fixed‑function) OpenGL to a modern graphics API — Core‑profile OpenGL and/or Metal. Epic / long‑term.

Why

  • MapMap renders with legacy OpenGL (~2.1: glBegin/glEnd, glVertex, glTexCoord, fixed‑function), used throughout (ShapeGraphicsItem, the GL canvases, texture handling).
  • Apple deprecated all of OpenGL in 2018; on Apple Silicon there is no native OpenGL driver — it is emulated on Metal (AppleMetalOpenGLRenderer). The legacy fixed‑function path is the most fragile part of that emulation.
  • Concrete symptoms today: Syphon output fails (Syphon output (server) unsupported on legacy OpenGL / Apple Silicon #620 — IOSurface texture creation in the legacy context floods cannot create texture, Metal texture cache was released), and we depend on a deprecated, emulated path that a future macOS could remove.

Scope (large)

  • Replace fixed‑function drawing with shaders + vertex buffers (Core profile), or a Metal/abstraction backend.
  • Touches the whole render chain: canvases, shape/texture graphics items, texture upload & sharing.
  • Cross‑platform constraint: MapMap also targets Linux/Windows, where OpenGL is the native standard. Core‑profile GL keeps a single codebase; Metal is macOS‑only and would need an abstraction (e.g. Qt RHI, or Vulkan + MoltenVK).

Benefits

Options to evaluate

  1. Core‑profile OpenGL (3.2+) — modern GL, still cross‑platform; best effort/reward ratio.
  2. Qt RHI (Qt 6's rendering abstraction over OpenGL/Vulkan/Metal/D3D) — most future‑proof + cross‑platform, larger migration.
  3. Metal (+ Syphon Metal server) — most durable on Mac, but macOS‑only.

Related: #620 (Syphon output).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions