DEV Community

Cover image for Go 1.26 Meets 2026 with a Professional Graphics Ecosystem
Andrey Kolkov
Andrey Kolkov

Posted on • Edited on

Go 1.26 Meets 2026 with a Professional Graphics Ecosystem

Last updated: 2026-02-12

Join the UI Discussion: We're building an enterprise-grade GUI toolkit for Go. Your input matters! GitHub Discussions


Happy New Year, Gophers!

As 2025 drew to a close, I shared something that made me incredibly proud: Go is entering 2026 with its first professional graphics ecosystem.

Back then, it was 249,000 lines. Today — six weeks later — it's 380,000+ lines of Pure Go code and growing. A complete GPU computing stack that requires nothing but go build.

No CGO. No Rust. No C. Just Go.


Where We Are Now (February 2026)

The Numbers

Metric Jan 2026 Feb 2026
Total Lines of Code 249K 380K+
GPU Backends 5 5 (Vulkan, DX12, Metal, GLES, Software)
Shader Targets 4 4 (SPIR-V, MSL, GLSL, HLSL)
Platforms 3 3 (Windows, Linux X11/Wayland, macOS)
Test Functions 1,400+ (UI alone)
Repositories 5 9 (+1 infra)
CGO Required None None

The Ecosystem

Project Description Version
gogpu/gg 2D Graphics (~155K LOC) v0.27.1
gogpu/wgpu Pure Go WebGPU (~97K LOC) v0.15.0
gogpu/ui GUI Toolkit (~54K LOC) v0.0.x
gogpu/naga Shader Compiler (~39K LOC) v0.12.0
gogpu/gogpu GPU Framework (~36K LOC) v0.17.0
gogpu/gpucontext Shared Interfaces v0.9.0
gogpu/gputypes WebGPU Types v0.2.0
gogpu/gg-pdf PDF Export v0.1.0
gogpu/gg-svg SVG Export v0.1.0

What Changed Since January

A lot happened in six weeks. Here are the highlights.

GPU SDF Accelerator

The biggest architectural addition: hardware-accelerated shape rendering via Signed Distance Fields.

import _ "github.com/gogpu/gg/gpu" // opt-in GPU acceleration

dc := gg.NewContext(800, 600)
dc.DrawCircle(400, 300, 100)
dc.Fill() // GPU renders via SDF if available, CPU fallback otherwise
Enter fullscreen mode Exit fullscreen mode

The accelerator auto-detects circles, ellipses, rectangles, and rounded rectangles from path data. Shapes that match get rendered via SDF compute shaders. Everything else falls back to the CPU rasterizer — transparently.

Architecture: CPU Core + GPU Accelerator

We made a fundamental architectural decision based on analysis of 8 enterprise 2D engines (Skia, Cairo, Vello, Blend2D, tiny-skia, piet, Qt RHI, Pathfinder):

CPU rasterization is the core. GPU is an optional accelerator.

In none of the 8 libraries analyzed is CPU rasterization a "backend". It's always the core. We follow the same pattern:

gg (2D Graphics)
  ├── internal/raster/   — CPU rasterization core (always available)
  ├── internal/gpu/      — GPU acceleration (uses wgpu HAL)
  └── gpu/               — Public opt-in: import _ "github.com/gogpu/gg/gpu"
Enter fullscreen mode Exit fullscreen mode
  • gg.Fill() tries GPU first, falls back to CPU
  • ~17ns overhead when no GPU registered
  • No "backend" abstraction in gg — GPU enhances, doesn't replace

Compute Shader Pipeline

Full GPU compute pipeline is now operational:

  • naga compiles WGSL compute shaders to SPIR-V
  • wgpu provides ReadBuffer HAL for GPU→CPU data transfer
  • gogpu exposes HalProvider for sharing GPU devices across the ecosystem
  • gg dispatches SDF compute work to the GPU

Shader Compiler Maturity (naga)

The shader compiler grew significantly:

  • v0.8.3 → v0.12.0 (4 major releases in 6 weeks)
  • Hex literal suffixes (0xFFu, 0x00i)
  • SPIR-V validation fixes for compute shaders
  • OpFunctionCall support
  • Runtime array support for storage buffers
  • 60+ WGSL built-in functions

WebGPU HAL Improvements (wgpu)

  • v0.9.2 → v0.15.0 (6 major releases)
  • ReadBuffer HAL abstraction — GPU buffer readback
  • GPU Resource Leak Detection (zero overhead when disabled)
  • W3C WebGPU Error Scopes (LIFO stack)
  • Thread Safety Tests (concurrent access validation)
  • Vulkan InitialLayout fix for LoadOpLoad render passes

Premultiplied Alpha Pipeline

Industry-standard premultiplied alpha compositing throughout the entire stack. Eliminates dark halos around anti-aliased shapes — matching what Skia, Cairo, and every professional engine does.

Unified Native Backend (gogpu)

The GPU framework eliminated ~950 lines of code duplication between Vulkan and Metal backends. A single implementation now works through the HAL abstraction layer:

  • v0.9.2 → v0.17.0 (8 major releases)
  • WindowProvider / PlatformProvider interfaces
  • DPI awareness, clipboard, cursor management (Win32)
  • HalProvider for GPU device sharing with gg

GUI Toolkit: Building, Not Just Designing

In January, we said gogpu/ui was "2026 Focus". Now it's 54,000 lines of code with 1,400+ tests.

What's Implemented

Component Status Description
Signals Working Fine-grained reactivity — Signal[T], Computed[T], Effect
Layout Engine Working Flexbox, Grid, Stack — constraint-based tree layout
Theme System Working Material 3 tokens, light/dark mode, typography, spacing
Focus Management Working Keyboard navigation, tab order, focus ring
Widget Base Working Lifecycle, dirty tracking, coordinate transforms
Button Working Material 3 themed with press/hover states
Checkbox Working Checked/unchecked/indeterminate with animations
Radio Group Working Exclusive selection with local coordinate layout
Canvas Working Pixel-grid snapping for crisp sub-pixel rendering
Event System Working Pointer events, keyboard events, coordinate translation

Architecture

The UI toolkit follows a three-layer architecture:

core/          — Widget implementations (button, checkbox, radio)
widget/        — Widget base system, lifecycle, context
theme/         — Material 3 theme system with tokens
state/         — Signals reactivity (Signal, Computed, Effect)
layout/        — Constraint-based layout (Flex, Grid, Stack)
focus/         — Keyboard navigation and focus management
event/         — Pointer, keyboard, IME events
render/        — Canvas abstraction over gg
a11y/          — Accessibility (planned: AccessKit)
Enter fullscreen mode Exit fullscreen mode

Each widget is a separate package under core/ — promoting modularity and tree-shaking.

What's Next for UI

  • Text Input — Cursor, selection, IME support
  • Scroll Container — Virtualized list rendering
  • Data Table — Sortable, filterable, virtualized
  • Accessibility — AccessKit integration (Pure Go)

What's Working Right Now

Full Cross-Platform Support:

  • Windows — Win32 windowing, Vulkan + DX12 + GLES backends, DPI awareness
  • Linux X11 — Pure Go X11 protocol, Vulkan + GLES backends
  • Linux Wayland — Pure Go Wayland protocol, Vulkan + GLES backends
  • macOS — Cocoa windowing, Metal backend

Complete Shader Pipeline:

  • WGSL source code
  • Compiles to SPIR-V (Vulkan), MSL (Metal), GLSL (OpenGL), HLSL (DirectX)
  • Vertex, fragment, and compute shaders
  • 60+ built-in functions, atomics, barriers

GPU-Accelerated 2D Graphics:

  • SDF accelerator for circles, rectangles, rounded rectangles
  • Vello-inspired tile rasterizer (Sparse Strips)
  • 29 blend modes (Porter-Duff + Advanced + HSL)
  • Premultiplied alpha pipeline
  • Layers, alpha masks, GPU text rendering
  • PDF export backend (gg-pdf)

What's Coming: GPU Path Rendering

We just completed a deep research study of GPU path rendering across 8 libraries. The result: a three-tier GPU rendering architecture for gg.

The Problem

Our current GPU accelerator handles detected shapes (circles, rects) via SDF. Everything else falls back to CPU. For complex paths — bezier curves, concave polygons, paths with holes — we need GPU rendering too.

The Solution: Stencil-Then-Cover

The same algorithm used by Skia, Gio, femtovg, and NV_path_rendering:

Pass 1 (Stencil Fill):
  Fan triangles from path → GPU writes winding numbers to stencil buffer
  Two-sided stencil: front=IncrWrap, back=DecrWrap

Pass 2 (Cover):
  Bounding quad over path → read stencil → write color where stencil ≠ 0
Enter fullscreen mode Exit fullscreen mode

Key insight: No complex CPU triangulation needed. Triangle fan from first vertex is O(n) and works for ANY path — concave, self-intersecting, with holes. The stencil buffer handles correctness.

Three-Tier Architecture

Tier Technique Paths Status
1 SDF Fragment Shader Circles, rects, rrects Working (CPU), render pipeline planned
2a Direct Convex Fan Convex polygons Planned
2b Stencil-Then-Cover All general paths Planned (9 tasks, ~10 days)
3 Vello Compute All paths (optimal) Future (blocked by shader compiler)

This is the next major milestone for gg.


The Community Effect

Here's what I love most about open source: we're not alone.

Active community engagement:

  • @amortaza — Real-world testing with Rust and Pure Go backends, reporting critical findings (Discussion #47)
  • @ppoage — macOS ARM64 testing (M1/M4), critical Issue #24 investigation, code contributions
  • @Nickrocky — macOS Metal backend testing and feedback
  • Community-reported issues leading to Vulkan fixes, NVIDIA compatibility improvements

Inspiration:

And if something still doesn't work? We fix it. Together.


2026 Roadmap — Updated

Quarter Focus Status
Q1 GPU SDF Accelerator, Architecture, Ecosystem Releases Done
Q1 GPU Path Rendering (Stencil-Then-Cover) In Progress
Q1-Q2 UI Toolkit Foundation (signals, layout, theme, base widgets) In Progress
Q2 UI: Text Input, Scroll, Data Table Planned
Q2-Q3 GPU SDF Render Pipeline + Convex Fast Path Planned
Q3 UI: Accessibility (AccessKit), Docking Planned
Q4 Stabilization, Documentation, Benchmarks Planned

A Message to the Go Community

For years, the answer to "How do I do graphics in Go?" was:

"Just use Rust/C++."

That answer is no longer acceptable. Go deserves better.

With Go 1.26 and 380K+ lines of Pure Go graphics code, Go now has a GPU ecosystem that stands on its own.


How You Can Help

Test on Your Hardware

git clone https://github.com/gogpu/gogpu
cd gogpu
go build ./examples/triangle/
./triangle
Enter fullscreen mode Exit fullscreen mode

Report issues: github.com/gogpu/gogpu/issues

Join the UI Discussion

We're making architectural decisions right now. Before v1.0.0 freezes the API.

Contribute

What we need:

  • Cross-platform testing (especially macOS, Linux Wayland, NVIDIA GPUs)
  • Documentation and tutorials
  • UI widget development (signals, widgets, layouts)
  • Real-world usage examples
  • Compute shader examples

Star the Repos


Looking Forward

2025 was about proving it's possible.

2026 is about making it excellent — and we're well on our way.

Together, we're building the GPU ecosystem Go has always deserved. Not because we have to — but because we can.

Let's make 2026 the year Go graphics goes mainstream.


The GoGPU Series

All articles documenting the GoGPU journey:

  1. GoGPU: A Pure Go Graphics Library for GPU Programming — The beginning
  2. GoGPU: From Idea to 100K Lines in Two Weeks — The rapid development story
  3. Building a Shader Compiler in Pure Go: naga — WGSL to SPIR-V/MSL/GLSL/HLSL
  4. Pure Go 2D Graphics Library with GPU Acceleration: Introducing gogpu/gg — 2D graphics API
  5. GPU Compute Shaders in Pure Go: gogpu/gg v0.15.3 — Sparse Strips GPU compute

Related Pure Go Projects

Building GoGPU led to creating supporting libraries — all Pure Go, all zero-CGO:


Links


Questions? Drop them in the comments or join the discussion.

Gophers of all lands, unite!

See you at GopherCon 2026!

Top comments (6)

Collapse
 
andres36_f046592b42556601 profile image
ANDRES36

"The Go community and Go Team are here. We'll fix it. Together."
Why are you lying? What community? github.com/orgs/gogpu/discussions/...

You said: "We" = 1 human architect + AI tools. Same as most modern dev teams in 2025, just more honest about it.

You are not being honest here. Still waiting for that article about how you wrote 249,000 lines of Pure Go code in such a short amount of time.

Collapse
 
kolkov profile image
Andrey Kolkov

Hi! ANDRES36, everything in its time... I didn't promise to publish it immediately.
I said I'd publish it when I have the time to finish it. I hope that time will finally appear after the New Year.
And may I ask why this intrigued you so much, why you're so eager to learn more?

Collapse
 
andres36_f046592b42556601 profile image
ANDRES36

shouldn't take that long, just use AI as usual. I just want people to know that your repo is completely AI generated, nothing wrong with that, you are allow to do it, if it works (I doubt), great, just be honest.

Thread Thread
 
kolkov profile image
Andrey Kolkov • Edited

Well, I won't try to change your mind if you've already made up your mind... If all this is generated at the click of a button, you can immediately run your own project in parallel and see how LLMs can generate a project of this scale for you that actually works as intended... Then we'll compare the results.
I'm not claiming this is a 100% production-ready system right away, but I have no doubt that the community and the Go team will soon perfect it... Which is essentially the main point of this article, if you actually read it carefully!

Thread Thread
 
andres36_f046592b42556601 profile image
ANDRES36

You are delusional if you think people are going to come and fix that maintainability nightmare. are you unemployed? Are you trying to fool an employer? That would make sense.

Thread Thread
 
kolkov profile image
Andrey Kolkov

Okay, please provide a link to your repositories. Show us your portfolio.