feat(webgl): Fix WebGL GAL rendering with proper coordinate setup

- Fix coordinate system for 1:1 pixel mapping (was using nm scale)
- Set worldUnitLength to 1/96 to match native test setup
- Add SetLookAtPoint and SetZoomFactor for proper view transformation
- Fix glDrawBuffers for WebGL 2.0 (array index must match attachment)
- Add legacy_gl_stubs.js for wxWidgets compatibility
- Add isReady() check to prevent race condition in Playwright tests

All 28 GAL test scenarios now render correctly in WebGL.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Viktor Vaczi 2026-01-08 10:13:11 +01:00
commit 18c73c355e
8 changed files with 165 additions and 27 deletions

View file

@ -94,7 +94,7 @@ test.describe('GAL WebGL Regression Tests', () => {
// Wait for module to be ready
await page.waitForFunction(() => {
return (window as any).galTest !== undefined;
return (window as any).galTest !== undefined && (window as any).galTest.isReady();
}, { timeout: 60000 });
// Run the scenario