tests/3d-regression mirrors the gal-regression pattern at renderer scale: shared C++ scenarios call real KiCad 3D-viewer code (opengl_utils, display lists + DrawCulled stencil subtraction, MODEL_3D VBOs, private generators via a rob-template accessor, and full reload()+Redraw() composites over a synthetic BOARD_ADAPTER). A native macOS harness renders them on real OpenGL into 47 committed goldens (bit-deterministic, FBO capture); the wasm harness compiles the same TUs against wasm/stubs/gl_ffp_stub.c no-ops so every scenario renders blank — the TDD red state (parity meter: 47/47 changed). Comparisons use the CI pixelmatch engine via the new generic compare-dirs.ts (floors.json levels; manifest.json cmp-guards registry drift). Documents an upstream bug: appendPostMachiningGeometry's countersink path adds middle quads without normals, silently erasing the walls of any display list it is batched into (3d-post-machining.png keeps the lists separate to record it). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
26 lines
771 B
C++
26 lines
771 B
C++
/**
|
|
* Scenario registry for the 3D-renderer regression suite.
|
|
*
|
|
* Scenario names are the single source of truth: they become the committed
|
|
* baseline filenames (3d-<name>.png), the entries of manifest.json and later
|
|
* the WebGL-port test IDs. Names are append-only — never renumber or rename.
|
|
*/
|
|
|
|
#ifndef SCENE3D_TEST_SCENARIOS_H
|
|
#define SCENE3D_TEST_SCENARIOS_H
|
|
|
|
struct SCENE3D_CTX;
|
|
|
|
namespace Scene3DTest
|
|
{
|
|
|
|
int GetScenarioCount();
|
|
const char* GetScenarioName( int aIndex );
|
|
|
|
/// Render scenario aIndex. The scenario body calls aCtx.BeginFrame(...) itself
|
|
/// (some scenarios use custom background colors) and then real KiCad 3D code.
|
|
void RenderScenario( SCENE3D_CTX& aCtx, int aIndex );
|
|
|
|
} // namespace Scene3DTest
|
|
|
|
#endif // SCENE3D_TEST_SCENARIOS_H
|