Commit graph pcbjam/lib
Author SHA1 Message Date
Viktor Vaczi
3287ec7616 Add GL immediate mode shim for Emscripten compatibility
Create custom JS library (lib/gl_immediate_shim.js) that fixes two
Emscripten LEGACY_GL_EMULATION issues without modifying KiCad source:

1. Color-per-vertex requirement: Emscripten requires glColor before
   each glVertex, but standard OpenGL uses persistent "current color".
   The shim tracks color state and auto-injects before each vertex.

2. Missing double-precision functions: glVertex2d, glVertex3d,
   glColor3d, glColor4d are unimplemented in Emscripten (wontfix).
   The shim provides these as wrappers to float variants.

Update test code to use standard OpenGL patterns (color set once,
multiple vertices) to verify the shim works correctly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 21:22:09 +01:00