Skip to content

WebGL 1.0 proof-of-life on Classic Mac OS #336

Description

@mplsllc

Status

MacSurf has an existing webgl/SCOPE.md research plan, status pre-Stage 0, for a software WebGL 1.0 implementation. The old umbrella #130 incorrectly grouped WebGL under a permanent won't-fix decision; that no longer reflects the project's documented direction.

Goal

Make canvas.getContext('webgl') return a real context capable of compiling/linking GLSL ES 1.00 and drawing a hardware-verified hello triangle on Classic Mac OS. Performance beyond proof-of-life is secondary.

Architecture baseline

The scope document proposes:

  • canvas-backed offscreen bitmap/GWorld
  • WebGL state machine in C
  • GLSL ES lexer/parser/type checker
  • software vertex/fragment execution (AST walker first, bytecode later)
  • software triangle rasterization and page compositing through the existing bitmap plotter

OS 9 OpenGL is fixed-function and cannot execute WebGL shaders, so programmable shader execution must be software-first.

Staging

Treat webgl/SCOPE.md as the detailed research seed, but re-audit it for the current QuickJS architecture before implementation because it predates the Duktape → QuickJS migration.

Acceptance — first meaningful milestone

  • <canvas> can acquire a WebGL context.
  • Typed-array inputs marshal correctly from QuickJS.
  • Minimal vertex + fragment shaders compile/link.
  • drawArrays(TRIANGLES, ...) produces the expected pixels.
  • Result is visible in normal page paint on the G3.
  • C89/CodeWarrior compatibility and bounded memory limits are documented.

Related: #109 Canvas 2D; historical umbrella #130.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: js-engineDuktape, ES5 evaluator, JS bindingsarea: renderingQuickDraw plotters, GWorld, paint pipelineenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions