Skip to content
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

Make the line renderer spec compliant #160

Merged
merged 2 commits into from
Dec 21, 2024
Merged

Make the line renderer spec compliant #160

merged 2 commits into from
Dec 21, 2024

Conversation

abey79
Copy link
Owner

@abey79 abey79 commented Dec 21, 2024

While debugging #159, it appeared that my strategy of using a stride that is lower than the attribute passed to the VS is not compliant with the spec:

image

As a result, the web demo was broken on Chrome for some time.

This PR primarily changes the way the point data is bound. It is now bound 4 times, each with a vertex offset, each with a single vertex passed to the shader, and each with a stride of one vertex. This strategy is compliant and doesn't even require any change to the vertex shader.

This PR also:

  • documents all of this properly
  • fixes some more minor non-compliance in the shader code such as to appease Chrome

@abey79 abey79 added vsvg-viewer Relates to vsvg-viewer bug Something isn't working labels Dec 21, 2024
@abey79 abey79 merged commit 182f8d4 into master Dec 21, 2024
10 checks passed
@abey79 abey79 deleted the fix-spec-compliance branch December 21, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vsvg-viewer Relates to vsvg-viewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant