Fix MSVC UTF-8 build error and seed rays in 2D lensing demo - #49
Open
thisisanubhav wants to merge 1 commit into
Open
Fix MSVC UTF-8 build error and seed rays in 2D lensing demo#49thisisanubhav wants to merge 1 commit into
thisisanubhav wants to merge 1 commit into
Conversation
- Uncomment and expand ray seeding in 2D_lensing.cpp so gravitational lensing is actually visible (fan of rays at varying heights). - Add /utf-8 MSVC compile flag so source files using non-ASCII identifiers (e.g. dλ) build correctly on MSVC.
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
2D_lensing.cpphad its ray-seeding line commented out, so the 2D demo window showed only a static black hole with no light rays. Uncommented it and expanded to a small fan of rays at varying heights so gravitational lensing is actually visible when you run it.CMakeLists.txtdidn't compile on MSVC out of the box: source files use non-ASCII identifiers (e.g.dλ), which MSVC misreads without an explicit UTF-8 flag, causingerror C3872: this character is not allowed in an identifier. Added/utf-8under anif (MSVC)guard to fix this without touching other platforms.Test plan