-
Notifications
You must be signed in to change notification settings - Fork 75
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
Improve webgl lineFeature and polygonFeature. #1016
Conversation
3711dbb
to
6453af8
Compare
6453af8
to
b3699a4
Compare
orderLen = order.length, | ||
posBuf, prevBuf, nextBuf, farBuf, flagsBuf, indicesBuf, | ||
posBuf, prevBuf, nextBuf, farBuf, flagsBuf, |
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.
@manthey would it be possible to add some note here on each buffer type specifically the flags buff?
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.
thanks
@@ -25,8 +25,10 @@ var flagsLineJoin = { // uses 3 bits with flagsLineCap | |||
round: 6, | |||
'miter-clip': 7 | |||
}; | |||
var flagsNearLineShift = 2, flagsFarLineShift = 5; | |||
var flagsNearOffsetShift = 8; // uses 11 bits | |||
var flagsNearLineShift = 2, flagsNearLineMult = 1 << flagsNearLineShift; |
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.
Same here, if we add some code comment on how these flags are used, it would be be easy to remember and understand the code
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.
@aashish24 I've added more to the comment above all of the flag definitions.
b3699a4
to
7ce2a0c
Compare
7ce2a0c
to
73d00ae
Compare
73d00ae
to
9564c45
Compare
Reduce memory transfer to the gpu when only styles have changed in lines or polygons. Rename some internal variables in the line feature to make it clearer. Use constants to avoid array lookups in a few spots.
Reduce memory transfer to the gpu when only styles have changed in lines or polygons.
Rename some internal variables in the line feature to make it clearer.
Use constants to avoid array lookups in a few spots.