Open
Conversation
Added nglSetProjectionMode
Added nglSetProjectionMode
add nglSetProjectionMode, readd error
Vogtinator
reviewed
Feb 23, 2026
gl.cpp
Outdated
| #ifdef _TINSPIRE | ||
| static bool is_monochrome; | ||
| #endif | ||
| static COLOR *screen_inverted; //For monochrome calcs |
Owner
There was a problem hiding this comment.
Can you put that into the #ifdef block above as well and put the only remaining use below into an #ifdef as well for consistency?
Vogtinator
reviewed
Feb 23, 2026
Vogtinator
reviewed
Feb 23, 2026
Vogtinator
reviewed
Feb 23, 2026
| void nglPerspective(VERTEX *v) | ||
| { | ||
| if (projection_mode == GL_PROJECTION_ORTHOGRAPHIC) | ||
| return; //Ortho mode |
Vogtinator
reviewed
Feb 23, 2026
|
|
||
| void nglPerspective(VERTEX *v) | ||
| { | ||
| if (projection_mode == GL_PROJECTION_ORTHOGRAPHIC) |
Owner
There was a problem hiding this comment.
I wonder if this is the right place. Arguably the projection should only be applied to actual drawing, not when calling nglPerspective manually? Not sure about use cases.
Author
There was a problem hiding this comment.
It felt less verbose than adding it to every usage of nglPerspective().
style Co-authored-by: Fabian Vogt <fabian@ritter-vogt.de>
styling
moved things
tobleroneaddict
commented
Feb 23, 2026
Author
tobleroneaddict
left a comment
There was a problem hiding this comment.
Rearranged projection mode, fixed preprocessor directives.
Vogtinator
reviewed
Feb 23, 2026
new line
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.
Orthographic mode can now be set using
nglSetProjectionMode(GLProjectionMode::GL_PROJECTION_ORTHOGRAPHIC)And can be reset with
GL_PROJECTION_PERSPECTIVE.Also cleaned up one compiler warning with
is_monochromeas it is never used on non-nspire systems