Major overhaul: math, Linux port, serialization, build system#7
Open
arc-butler wants to merge 2 commits into
Open
Major overhaul: math, Linux port, serialization, build system#7arc-butler wants to merge 2 commits into
arc-butler wants to merge 2 commits into
Conversation
- Vector.h: Float TVec types now backed by GLM (SIMD-optimized) FVec2/3/4 delegate to glm::vec2/3/4 internally Fixed bugs: operator* subtract, operator== comma, Normalize this/*this, Cross comma Non-float TVec (int, uint32, etc.) kept with bug fixes - SMath.h: All vector ops use GLM for float, generic fallback for integral Fixed SMath::Sqrt using float-only sqrtf Dot/Dist/DistSqr/Length/Normalize/Cross delegate to GLM - Linux platform support: LinuxWindow, LinuxInput, LinuxPlatformUtils (Zenity) - PlatformDetection.h: Linux enabled, ARC_API portable - Macros.h: Portable debugbreak, profiling function name - EntryPoint.h: Linux support, generic profile session names - Build system: premake5.lua updated for Linux (GL, dl, pthread) - CI: GitHub Actions workflow (Windows + Linux builds) - Binary scene serialization implemented (magic+version+entities+components) - Fixed backslash paths in WindowsWindow.cpp, Glm.cpp, TybeBase.h - Comprehensive README with build instructions and architecture - Linux setup script, updated .gitignore
…tion
- Test framework: doctest (single-header, MIT)
- Tests project with premake5 build config
- 35+ test cases covering:
- FVec2/3/4 construction, operators, math (Length, Normalize, Dist, etc.)
- Cross product correctness + GLM consistency
- Regression tests for all fixed bugs (operator* subtract, operator== comma,
Normalize pointer, Cross comma)
- Non-float TVec types (int, uint32_t, uint8_t)
- SMath::Dot/Dist/DistSqr/Length/Normalize/Cross/Clamp/Min/Max/Abs/Sqrt
- FColor4 construction and operations
- FTransform2D/3D default and custom
- YAML round-trip serialization for FVec2/3/4 and FColor4
- CI runs tests after building
Author
Tests (added in latest commit)Added a Tests project with doctest framework — 35+ test cases covering:
CI now builds and runs Tests on every push. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Complete math rewrite + Linux platform support + binary serialization.
Math (Vector.h + SMath.h)
glm::vec2/3/4internallyTVec<N,T>::operator*was subtracting instead of multiplying (line 96,this->Data()[i] - _.Data()[i])TVec<4,T>::operator==used comma operator:z == _.z, w == _.w→ result was justw == _.wTVec::Normalizeusedthis / Length()(pointer) instead of*this / Length()TVec<3,T>::Crossreturned comma-expression tuple instead of proper vectorSMath::Sqrtusedstd::sqrtf(float-only), broke with doublesFVec2,SMath::Dot, etc.Linux Platform
Build System & CI
Serialization
Housekeeping