# rswinkle/PortableGL

An implementation of OpenGL 3.x-ish in clean C

Repository: https://github.com/rswinkle/PortableGL
Canonical: https://ross.abutalabs.com/products/portablegl
Language: C
License: MIT
License Family: permissive
Topics: opengl, graphics, rendering, software-renderer, 3d, single-header-library, software-rendering, 3d-graphics, computer-graphics, rasterization, rasterizer, rendering-pipeline, shader, shaders, tutorial, renderer
Last push: 2026-08-04T23:59:45+00:00

## Health v2 (maintenance only)
Score: 80/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 96, release rhythm 49, longevity 100
- inputs: {"age_days": 2183, "days_push": 29, "days_rel": 181, "gap_med": 171, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1279, forks 60 (observed 2026-08-28T04:04:13.547665+00:00)

## What it is
PortableGL is a software implementation of OpenGL 3.x core written in clean C99 as a single-header library in the style of the stb libraries. It renders to arbitrary 32- or 16-bit framebuffers, using C/C++ functions instead of GLSL for shaders.

## Use cases
- render 3D graphics without GPU or OpenGL drivers
- add OpenGL-style rendering to any codebase via a single header
- learn how an OpenGL rendering pipeline works internally
- write shaders as plain C functions instead of GLSL
- render to offscreen framebuffers or image files
- port OpenGL applications to platforms without native GL support

## When to choose
- you need portable software rendering with no GPU dependency
- you want a small, easy-to-integrate single-header C library
- you want readable source code to study or modify the rendering pipeline
- you need to match OpenGL 3.x features in pure C/C++

## When to avoid
- you need maximum rendering performance or hardware acceleration
- you require exact OpenGL API compliance or a GLSL compiler
- you are building a production game that should use the real GPU driver

## Facets
- artifact type: library
- maturity: active
- function: graphics, game-engine, simulation
- domain: graphics, cross-platform
- platform: cross-platform, windows, cpp, c
- tags: opengl, software-rendering, rasterizer, single-header, c99, shaders, 3d-graphics, sdl2, game-development, linux, macos

## Member repositories
- rswinkle/PortableGL (main) score 80

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:13.547665+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:02:42.373471+00:00, confidence not recorded.
  - readme: https://github.com/rswinkle/PortableGL (fetched 2026-08-28T04:04:13.547665+00:00, sha 6bd1638d1ae3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
