-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
* add basic marker style to stylesheet * pass through marker style to PBF conversion * marker/point tile parsing, bucket, buffer, shaders, etc. * new sprite hosting for 1x/2x variants * sprite load accepts screen scale argument
@@ -54,7 +55,7 @@ void Map::resize(uint32_t width, uint32_t height, uint32_t fb_width, uint32_t fb | |||
transform.height = height; | |||
transform.fb_width = fb_width; | |||
transform.fb_height = fb_height; | |||
transform.pixelRatio = (double)fb_width / (double)width; |
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.
This is sort of intentional. If fb_width
is not different from width
on a retina screen, there is a bug elsewhere.
Looks very good! I'll have a look and see why the points aren't rendering on OS X. |
|
It looks like there are bogus points at 0/0, I'm currently investigating on why that is the case, because they don't seem to be added to the buffer... |
@incanus this is not yet ready as it still doesn't work on OS X, just on iOS. There seems to be a change in how |
Digging into this, but does this have something to do with differences in |
@kkaefer on OS X you need to I'm not sure where you were with your debugging but I got past that last blocker. |
Yeah, that's what I was looking for! |
I think this is good to go! |
refs #60: first cut of POI rendering
Badassery. Nice work @kkaefer and thanks for rounding this out. |
* Use DisplayLink to prevent crashes in willResignActive * Fixed screen freeze issue in the DisplayLink PR when bringing app back to foreground. Includes relevant changes from Mapbox PR (mapbox/mapbox-gl-native-ios#432). Co-authored-by: Jukka Hietanen <jukka.hietanen@accelbit.com>
Basic POI rendering with existing style (i.e. only
alcohol-shop
).1x
/2x
variantsAlso,
opacity
is supported in the stylesheet much like on WebGL but the current stylesheet doesn't use it.I am wiiiiide open to review here as this is the most C++ code I've ever written. Outstanding issues/questions:
2x
variant on the old URL. I was able to find a pre-made2x
variant in the WebGL project.transform.pixelRatio
just yet. This is used inbucket.drawPoints
to use the right sprite and seems like a good place to persist it. Why was it always1.0
before?glDrawElements
instead ofglDrawArrays
but not sure if it's necessary. As I understand it, we do this with lines and fill outlines (and in general) in order to avoid duplication of vertices in draw calls. This probably isn't an issue with points.