|
2 | 2 |
|
3 | 3 | ## Scope |
4 | 4 |
|
5 | | -- `Engine/` builds the C++17 `PyramidEngine` library. `Libraries/` owns independently testable `PyramidFoundation`, `PyramidMath`, `PyramidInput`, `PyramidImage`, and `PyramidModel` packages. |
| 5 | +- `Engine/` builds the C++17 `PyramidEngine` library. `Libraries/` owns independently testable `PyramidFoundation`, `PyramidMath`, `PyramidInput`, `PyramidImage`, `PyramidModel`, `PyramidText`, and `PyramidUI` packages. |
6 | 6 | - Engine-owned modules are Core, Graphics, and Win32/WGL Platform. Foundational types/logging, math, physical/action input, image codecs, and CPU asset-format parsing must remain outside the engine binary. |
7 | 7 | - `Examples/BasicGame` and `Examples/BasicRendering` are the graphical references; `Examples/RTSReference` is reusable game-side support and is not part of the installed engine API. |
8 | 8 | - `Tests/PublicApiLinkage.cpp` protects selected public symbols. Focused tests cover platform input state, generic action mapping, reusable camera controllers, game-side RTS interaction, resize behavior, camera/frustum logic, framebuffers, texture loading, spatial updates/queries/configuration/compaction, render bounds, resources/caches, registry handles/manifests, the authoritative entity scene, and scene serialization. `Tests/EntitySceneTests.cpp` protects stable entity IDs, cycle-safe hierarchy transforms, inherited visibility, component attachment, generated renderer/light proxies, and recursive destruction. `Tests/SceneSerializationTests.cpp` protects deterministic version-2 entity/component round trips, exact manifest references, hierarchy validation, and missing/stale resource diagnostics. |
@@ -32,7 +32,7 @@ ctest --preset test-gcc-release |
32 | 32 |
|
33 | 33 | - C++17, four spaces, braces on new lines. |
34 | 34 | - Types/public methods use `PascalCase`; locals/parameters use `camelCase`; fields use `m_`. |
35 | | -- Prefer RAII, explicit ownership, and `PYRAMID_LOG_*` diagnostics. CPU model parsing belongs in `Pyramid::Model`; it must not depend on graphics, Win32, OpenGL, or GLAD. Graphics publication must use `ModelResourceImporter` and the existing mesh cache rather than parallel upload ownership. OBJ/MTL changes require positive/negative index, malformed-input, limit, file-resolution, and transactional upload tests. Geometry passed to scenes must use `Mesh`; do not reintroduce raw vertex-array fields on `RenderObject`. Shared reusable geometry should be acquired through the game-owned `ResourceRegistry::Meshes()` cache; do not create parallel uploads for byte-identical mesh specifications. Shared shader programs should be acquired through `ResourceRegistry::Shaders()`; do not mutate cached `ShaderProgram` instances directly or compile identical stage source repeatedly. Shared sampled textures should use `ResourceRegistry::Textures()`; cached `TextureResource` instances are immutable, color space is part of identity, and file changes must be published through transactional reload. Scene renderables should acquire immutable `Material` resources through `ResourceRegistry::Materials()` rather than ad-hoc shader/texture fields; per-draw matrices belong in command-buffer uniforms, not material identity. Platform input must remain backend-neutral at the public API boundary: native messages feed `InputState`, `Game` evaluates generic `InputActionSystem` contexts before updates, and focus loss must release held controls. Never hard-code RTS or other game-specific action names into the input module. Camera controllers must consume configurable named action references, keep physical bindings in examples/games, and distinguish per-frame delta input from time-scaled rate input; reference profiles belong in examples or games. RTS selection, command, unit, ownership, and edge-scroll semantics must remain in game/reference layers rather than `Pyramid::Engine`; focused behavior belongs in `Tests/RTSInteractionTests.cpp`. Long-lived scene and serialized references should use typed registry handles. Handles must stay non-owning, every alias bind/remap/removal must advance its generation, direct cache mutation must invalidate existing handles, and stale handles must resolve to null rather than a replacement resource. |
| 35 | +- Prefer RAII, explicit ownership, and `PYRAMID_LOG_*` diagnostics. CPU model parsing belongs in `Pyramid::Model`; it must not depend on graphics, Win32, OpenGL, or GLAD. Graphics publication must use `ModelResourceImporter` and the existing mesh cache rather than parallel upload ownership. OBJ/MTL changes require positive/negative index, malformed-input, limit, file-resolution, and transactional upload tests. Geometry passed to scenes must use `Mesh`; do not reintroduce raw vertex-array fields on `RenderObject`. Shared reusable geometry should be acquired through the game-owned `ResourceRegistry::Meshes()` cache; do not create parallel uploads for byte-identical mesh specifications. Shared shader programs should be acquired through `ResourceRegistry::Shaders()`; do not mutate cached `ShaderProgram` instances directly or compile identical stage source repeatedly. Shared sampled textures should use `ResourceRegistry::Textures()`; cached `TextureResource` instances are immutable, color space is part of identity, and file changes must be published through transactional reload. Scene renderables should acquire immutable `Material` resources through `ResourceRegistry::Materials()` rather than ad-hoc shader/texture fields; per-draw matrices belong in command-buffer uniforms, not material identity. Platform input must remain backend-neutral at the public API boundary: native messages feed `InputState`, `Game` evaluates generic `InputActionSystem` contexts before updates, and focus loss must release held controls. Never hard-code RTS or other game-specific action names into the input module. Camera controllers must consume configurable named action references, keep physical bindings in examples/games, and distinguish per-frame delta input from time-scaled rate input; reference profiles belong in examples or games. UI layout, widget state, hit testing, focus, pointer capture, and draw-list generation belong in `Pyramid::UI`; the library must remain independent of OpenGL, Win32, scenes, and game semantics. Debug and game UI must share this runtime rather than introduce parallel systems. `Pyramid::Text` owns renderer-independent glyph metrics and glyph-run generation. UI layers must reserve handled controls with `InputConsumptionMask` before action-context evaluation, and graphics publication must go through `UIRenderer` rather than placing OpenGL calls in `Pyramid::UI`. RTS selection, command, unit, ownership, and edge-scroll semantics must remain in game/reference layers rather than `Pyramid::Engine`; focused behavior belongs in `Tests/RTSInteractionTests.cpp`. Long-lived scene and serialized references should use typed registry handles. Handles must stay non-owning, every alias bind/remap/removal must advance its generation, direct cache mutation must invalidate existing handles, and stale handles must resolve to null rather than a replacement resource. |
36 | 36 | - Scene authoring must use `Entity` plus components; do not reintroduce `SceneNode` or make `RenderObject` transforms authoritative. Renderer/light proxies are generated from the scene. Stable entity IDs and hierarchy invariants must remain serialization-safe. |
37 | 37 | - Do not add required interface methods with silent no-op defaults. |
38 | 38 | - Do not expose source-tree absolute paths through installed target interfaces. |
|
0 commit comments