feat(webgl): Add GAL native test harness for visual regression testing
Add a standalone test application that compiles KiCad's actual OPENGL_GAL against system wxWidgets to generate baseline screenshots for comparing native OpenGL rendering against WebGL rendering in the browser. Architecture: - Compiles 18 KiCad GAL source files from the kicad submodule - Uses template-based private member accessor (safer than #define private public) - Generates shader C++ files from GLSL (10 shader pairs for SMAA AA) - Minimal stubs for KiCad dependencies (PGM_BASE, ADVANCED_CFG, etc.) Test coverage: - 11 scenarios testing ~19% of GAL API - basic-lines, line-widths, circles, arcs, rectangles, polygons - alpha-blending, transforms, grid-cursor, segments, complex-scene Key insights documented: - GAL uses world-to-screen transformation requiring 1:1 pixel mapping - FBO reading required for clean screenshots on macOS - Layer depth needed for proper z-ordering in complex scenes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
5147917ea7
commit
490f531521
46 changed files with 4075 additions and 0 deletions
13
tests/gal-regression/native/generated/glsl_kicad_frag.h
Normal file
13
tests/gal-regression/native/generated/glsl_kicad_frag.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// Auto-generated shader header from kicad_frag.glsl
|
||||
#ifndef GLSL_KICAD_FRAG_H
|
||||
#define GLSL_KICAD_FRAG_H
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace KIGFX {
|
||||
namespace BUILTIN_SHADERS {
|
||||
extern std::string glsl_kicad_frag;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // GLSL_KICAD_FRAG_H
|
||||
Loading…
Reference in a new issue