implement rendering!!!! - #20
Open
IanRPage wants to merge 10 commits into
Open
Conversation
need vec4 for rendering colors
…dBatch) low-level rendering primitives: window/context/GLAD setup, shader compile+link with surfaced GLSL error logs (loaded from assets/shaders/ via AssetPaths.hpp.in), VAO/VBO mesh wrapper + mesh-generation library (quad/circle/icosphere/box/capsule/hull triangulation), and the double-buffered orphan and refill instanced draw batch
OrthographicCamera and PerspectiveCamera view-projection math, plus FreeFlyCameraController (mouse-look yaw/pitch + WASD/Space/Ctrl movement) for 3D view
per-body render color outside BodyStore (physics sep from rendering) in a handle-indexed store that self heals on body slot reuse via generation checks. unlike the rest of render/, this has zero GL dependency, so i added tests for it covering default-color fallback, set/get, and stale generation after reuse
ConvexHullShape bodies have per-body polygon geometry that can't share a "canonical" (fkn claudisms) mesh the way sphere/box/capsule do. therefore, each gets its own lazily built, fan triangulated mesh cached by BodyHandle, and is pruned once per frame for dead handles
ties everything together. Renderer owns window, shared shader, per-shape mesh/batch pairs, and camera state, driving a fixed-timestep Simulator each frame w/ an ImGui sidebar, and the rest of the window as the world view. CMakeLists.txt adds new sources, configures AssetPaths.hpp from the .in template, and drops the asset-copy line. we got something that runs lads
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
this MR adds the rendering layer on top of the physics core (all my hardwork): a GLFW/GL 4.1 window, GPU-instanced drawing, and an ImGui demo app
render/module:assets/shaders/. surfaces GLSL errors as exceptionsBodyStore. self-heals on body-slot reuse using generation checks (added unit tests for this)ConvexHullShapebodies