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

Add auto primitiveShape to the webgl point feature. #1031

Merged
merged 2 commits into from
Oct 4, 2019

Conversation

manthey
Copy link
Contributor

@manthey manthey commented Sep 19, 2019

The new default primitiveShape, auto, uses a sprite (a webgl point) if points are smaller than the GPU's maximum point size and a triangle if any are larger. Specific primitive shapes can still be specified, as there are performance reasons for each of them and auto detection has some time cost.

@manthey manthey force-pushed the auto-point-primitive branch from 771e144 to ebf95d9 Compare September 19, 2019 14:43
@manthey manthey force-pushed the webgl-point-improvements branch from 7319b6b to 3d6472f Compare September 19, 2019 16:31
@manthey manthey force-pushed the auto-point-primitive branch from ebf95d9 to c3113a0 Compare September 19, 2019 16:33
@@ -222,6 +220,9 @@ var webgl_pointFeature = function (arg) {
fillVal = fillFunc(item, i) ? 1.0 : 0.0;
fillOpacityVal = fillOpacityFunc(item, i);
fillColorVal = fillColorFunc(item, i);
if (m_primitiveShapeAuto && ((fillVal && fillOpacityVal) || (strokeVal && strokeOpacityVal)) && radiusVal + (strokeVal && strokeOpacityVal ? strokeWidthVal : 0) > maxr) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line is probably too long and need to be split for consistency

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I split it to multiple lines.

@manthey manthey force-pushed the auto-point-primitive branch from c3113a0 to 66c2d60 Compare September 26, 2019 20:03
@manthey manthey changed the base branch from webgl-point-improvements to master September 26, 2019 20:03
Copy link
Member

@aashish24 aashish24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the changes looks reasonable and straightforward from the GL point of view. Just had a minor comment

@manthey manthey force-pushed the auto-point-primitive branch from caabdc9 to 0003a64 Compare September 26, 2019 20:31
The new default primitiveShape, `auto`, uses a sprite (a webgl point) if
points are smaller than the GPU's maximum point size and a triangle if
any are larger.  Specific primitive shapes can still be specified, as
there are performance reasons for each of them and auto detection has
some time cost.
@manthey manthey merged commit 91876b3 into master Oct 4, 2019
@manthey manthey deleted the auto-point-primitive branch October 4, 2019 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants