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

Implement all Webgl marker types #11098

Merged
merged 5 commits into from Mar 24, 2021
Merged

Implement all Webgl marker types #11098

merged 5 commits into from Mar 24, 2021

Conversation

ianthomas23
Copy link
Member

This PR implements all missing WebGL marker types and some related improvements. It fixes the first four items in issue #11051 which are:

  1. Instanced rendering using a single quad mesh rather than gl_PointSize.
  2. Corrections to some existing WebGL marker types, e.g. sizes, lengths of lines.
  3. Added all missing marker types.
  4. Keep full-length visual properties on GPU and pass in an array of bools to indicate which indices to render.

I haven't added any new tests as we have a comprehensive test of all marker types here:
Marker_glyph__should_support_glyph_methods_and_rotation

Some are heavier or lighter than their canvas/svg equivalents and many don't correctly display large line_widths yet (or dashed line or hatches for that matter). But they are fine if you keep them small with line_width=1 or so.

I've kept the MarkerGL.is_supported function for the moment, even though it returns true for all known marker types, just in case I have missed something and we need it back.

@ianthomas23
Copy link
Member Author

There are a lot of changed test images. I have looked at each one to check they are better than before, or at least no worse.

@mattpap
Copy link
Contributor

mattpap commented Mar 24, 2021

've kept the MarkerGL.is_supported function for the moment, even though it returns true for all known marker types, just in case I have missed something and we need it back.

It still will be useful in near future, unless we can replicate canvas API in webgl (I know it's doable, I'm not sure if it's worthwhile).

@mattpap mattpap merged commit 772af76 into bokeh:branch-2.4 Mar 24, 2021
@ianthomas23 ianthomas23 deleted the webgl_markers branch July 8, 2021 18:34
bryevdv pushed a commit that referenced this pull request Dec 13, 2021
* Use vertex mesh rather than gl_PointSize

* Full-length attributes to shader plus bools to show or not

* Fix existing webgl markers

* Add missing WebGL marker types

* Update test images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants