-
-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow line loops on Cylindrical projection. #3505
Conversation
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 126 changes primitive type to triangles, which is what you've missed.
Thanks to @10110111 for a bugfix
9d63a4b
to
44c4b61
Compare
Great! But the bug is still present with umbra/penumbra for satellites. |
src/core/StelVertexArray.cpp
Outdated
@@ -55,14 +56,13 @@ StelVertexArray StelVertexArray::removeDiscontinuousTriangles(const StelProjecto | |||
else | |||
{ | |||
ret.indices.clear(); | |||
unsigned short int limit; | |||
const unsigned short int limit=static_cast<unsigned short int>(vertex.size()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be a good idea to assert that vertex.size() <= USHRT_MAX
(or std::numeric_limits<unsigned short>::max()
).
Also, this line could be shortened by removing repetition from the LHS and the useless int
from the RHS. Or just using an implicit cast.
src/core/StelVertexArray.cpp
Outdated
@@ -23,6 +23,7 @@ | |||
StelVertexArray StelVertexArray::removeDiscontinuousTriangles(const StelProjector* prj) const | |||
{ | |||
StelVertexArray ret = *this; | |||
ret.primitiveType = Triangles; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better to put it inside the switch
, for symmetry with lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than my comments, LGTM.
Hello @gzotti! Please check the fresh version (development snapshot) of Stellarium: |
Hello @gzotti! Please check the latest stable version of Stellarium: |
Description
This prevents the connection of line segments over disconnected viewport edges.
For this, I convert the LineLoop to an indexed set of GL_LINEs.
Fixes #3503 (issue)
Screenshots (if appropriate):
Type of change
How Has This Been Tested?
Disable lunar scale-up, activate earth shadow circles (GridLinesMgr). Zoom out, place earth's shadow cycles close to screen edge.
Test Configuration:
Checklist: