pcbjam/tests/gal-regression/wasm/webgl
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Viktor Vaczi 7617acf8b5 fix(webgl): Add VAO support for WebGL 2.0 rendering
WebGL 2.0 / OpenGL ES 3.0 requires a Vertex Array Object (VAO) to be
bound before setting vertex attributes. Desktop OpenGL has a default
VAO (VAO 0), but WebGL 2.0 does not.

Changes to GPU_MANAGER:
- Add m_vao member variable to store VAO handle
- Create VAO in SetShader() when GL context is available
- Bind VAO before glVertexAttribPointer calls in EndDrawing()
- Unbind VAO after rendering completes
- Delete VAO in destructor

This fix enables actual rendering output in WebGL. Without a VAO,
glVertexAttribPointer silently fails and no geometry is drawn.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 11:19:16 +01:00
..
antialiasing.h feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
bitmap_font_desc.c feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
bitmap_font_img.c feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
cached_container.cpp feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
cached_container.h feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
cached_container_gpu.cpp feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
cached_container_gpu.h feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
cached_container_ram.cpp feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
cached_container_ram.h feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
fullscreen_quad.cpp feat(webgl): Replace legacy GL with modern OpenGL ES 3.0 2026-01-07 23:33:49 +01:00
fullscreen_quad.h feat(webgl): Replace legacy GL with modern OpenGL ES 3.0 2026-01-07 23:33:49 +01:00
gl_context_mgr.cpp feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
gl_context_mgr.h feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
gl_resources.cpp feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
gl_resources.h feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
gl_utils.h feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
gpu_manager.cpp fix(webgl): Add VAO support for WebGL 2.0 rendering 2026-01-08 11:19:16 +01:00
gpu_manager.h fix(webgl): Add VAO support for WebGL 2.0 rendering 2026-01-08 11:19:16 +01:00
kiglew.h feat(webgl): Replace legacy GL with modern OpenGL ES 3.0 2026-01-07 23:33:49 +01:00
noncached_container.cpp feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
noncached_container.h feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
shader.cpp feat(webgl): Replace legacy GL with modern OpenGL ES 3.0 2026-01-07 23:33:49 +01:00
shader.h feat(webgl): Replace legacy GL with modern OpenGL ES 3.0 2026-01-07 23:33:49 +01:00
SmaaAreaTex.h feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
SmaaSearchTex.h feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
utils.cpp feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
utils.h feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
vertex_common.h feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
vertex_container.cpp feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
vertex_container.h feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
vertex_item.cpp feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
vertex_item.h feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
vertex_manager.cpp feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
vertex_manager.h feat(webgl): Replace legacy GL with modern OpenGL ES 3.0 2026-01-07 23:33:49 +01:00
webgl_antialiasing.cpp feat(webgl): Replace legacy GL with modern OpenGL ES 3.0 2026-01-07 23:33:49 +01:00
webgl_antialiasing.h feat(webgl): Add WEBGL_GAL implementation (compiles, not yet rendering) 2026-01-07 21:04:42 +01:00
webgl_compositor.cpp feat(webgl): Fix WebGL GAL rendering with proper coordinate setup 2026-01-08 10:13:11 +01:00
webgl_compositor.h feat(webgl): Replace legacy GL with modern OpenGL ES 3.0 2026-01-07 23:33:49 +01:00
webgl_gal.cpp feat(webgl): Enable all 28 scenarios for WebGL test harness 2026-01-08 11:11:03 +01:00
webgl_gal.h feat(webgl): Replace legacy GL with modern OpenGL ES 3.0 2026-01-07 23:33:49 +01:00