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>
27 lines
529 B
C
27 lines
529 B
C
/**
|
|
* KiCad stubs for native GAL test build
|
|
*
|
|
* This header ONLY provides includes - no type definitions.
|
|
* Implementations of missing symbols are in kicad_stubs.cpp.
|
|
*/
|
|
|
|
#ifndef KICAD_STUBS_H
|
|
#define KICAD_STUBS_H
|
|
|
|
// GLEW must come before any OpenGL headers (including wx/glcanvas.h)
|
|
#include <GL/glew.h>
|
|
|
|
// System wxWidgets
|
|
#include <wx/wx.h>
|
|
#include <wx/glcanvas.h>
|
|
|
|
// Profiler macros - no-op
|
|
#ifndef PROF_TIMER
|
|
#define PROF_TIMER(name)
|
|
#endif
|
|
|
|
#ifndef PROF_END
|
|
#define PROF_END(name)
|
|
#endif
|
|
|
|
#endif // KICAD_STUBS_H
|