Commit Graph
100 Commits
Author SHA1 Message Date
Hannes Janetzek 6a34e478f5 improve text placement a little 2013-10-09 01:55:49 +02:00
Hannes Janetzek 70e6266319 sanitize map scale input 2013-10-09 01:55:49 +02:00
Hannes Janetzek e21831ceb9 more line shader experiments: use sqrt() lookup table in fragment shader 2013-10-09 01:55:49 +02:00
Hannes Janetzek e1fb97ae30 draw text textures only once per string
- unify duplicate strings from different tiles (as side-effect save some bytes)
- fix 'advance by width' in texture drawing
2013-10-09 01:55:49 +02:00
Hannes Janetzek 928c7e7328 comment 2013-10-09 01:55:49 +02:00
Hannes Janetzek 9705811f7b fix way too much z-offset used for roof outline 2013-10-09 01:55:49 +02:00
Hannes Janetzek 38239cd615 dont add z-offset way labels 2013-10-09 01:55:48 +02:00
Hannes Janetzek cafbdc31c1 fix drawing of tile bounding box 2013-10-09 01:55:48 +02:00
Hannes Janetzek 62bc122930 use smoothstep interpolation for simple line shader
testing with one vertexAttribArray, this should be faster for switching polgon/line shaders
2013-10-09 01:55:48 +02:00
Hannes Janetzek 3c990b3289 add more labels as they fit at current scale 2013-10-09 01:55:48 +02:00
Hannes Janetzek 5c36b204ce no timing required 2013-10-09 01:55:48 +02:00
Hannes Janetzek 21584637ed cleanup 2013-10-09 01:55:48 +02:00
Hannes Janetzek bdbe0c1527 handle explicitly closed polygons and those with touching inner/outer rings in one point. Bologna is a heavy case.. 2013-10-09 01:55:48 +02:00
Hannes Janetzek 41810529af fix: dont increment these pointers conditionally 2013-10-09 01:55:48 +02:00
Hannes Janetzek dabfe680a9 one single light direction from north 2013-10-09 01:55:48 +02:00
Hannes Janetzek 3414915622 minus one useless iteration 2013-10-09 01:55:48 +02:00
Hannes Janetzek 7c2decdee4 Triangle does not like duplicate points in input: skip them
TODO fix polygon holes that touch outer ring in input..
2013-10-09 01:55:48 +02:00
Hannes Janetzek dcb6e11ee8 use debugview switch to enable depth test shader 2013-10-09 01:55:48 +02:00
Hannes Janetzek 2148e7564c theme: same color for 3D and flat buildings 2013-10-09 01:55:48 +02:00
Hannes Janetzek b8287f9ecf move near plane back, fixes clipping issue with most large buildings 2013-10-09 01:55:48 +02:00
Hannes Janetzek c462793b99 move shaders to repective renderer classes 2013-10-09 01:55:48 +02:00
Hannes Janetzek 007ab2e3bf fix z-fighting on overlapping buildings:
- modify projection matrix to add offset, glPolygonOffset is not that reliable
2013-10-09 01:55:48 +02:00
Hannes Janetzek d1388660a1 fix screen rotation causing 'out of VBOs' issue 2013-10-09 01:55:48 +02:00
Hannes Janetzek 74cf517b15 cleanup 2013-10-09 01:55:48 +02:00
Hannes Janetzek 464e0b17ec some optimizations 2013-10-09 01:55:48 +02:00
Hannes Janetzek a9f97bfedb fix depth shader 2013-10-09 01:55:48 +02:00
Hannes Janetzek da64700613 decrease building height 2013-10-09 01:55:48 +02:00
Hannes Janetzek 9a86b6b134 add helper 2013-10-09 01:55:48 +02:00
Hannes Janetzek a9f5525c50 trying to get polygon offset right... 2013-10-09 01:55:48 +02:00
Hannes Janetzek a7790537f2 use matrix utilities 2013-10-09 01:55:48 +02:00
Hannes Janetzek 4acd9a492f finally got that z-value for un-projection right (=
- add more matrix utilities
2013-10-09 01:55:48 +02:00
Hannes Janetzek a8bcc59e25 use special landuse=urban tag 2013-10-09 01:55:48 +02:00
Hannes Janetzek bfe8cf2889 use setTileMatrix utility function 2013-10-09 01:55:48 +02:00
Hannes Janetzek 5b3b299217 cleanup extrusion layer when it was not compiled 2013-10-09 01:55:48 +02:00
Hannes Janetzek 2e8bcd865a formatting 2013-10-09 01:55:48 +02:00
Hannes Janetzek cb6a861f7f add shader for depth buffer testing 2013-10-09 01:55:47 +02:00
Hannes Janetzek bca4a24c38 increase read-buffer if necessary 2013-10-09 01:55:47 +02:00
Hannes Janetzek 82eb7e4973 more line intersection utilities 2013-10-09 01:55:47 +02:00
Hannes Janetzek 1c11cd1780 building shader experiments 2013-10-09 01:55:47 +02:00
Hannes Janetzek 80de20a423 reworking the gl projection/unprojection stuff 2013-10-09 01:55:47 +02:00
Hannes Janetzek dd3c0a71c3 sort tiles to make labeling more deterministic 2013-10-09 01:55:47 +02:00
Hannes Janetzek f266d61a35 fix wrap over date-line, again
started on-hold mode to avoid relabeling while zoom gesture is active
2013-10-09 01:55:47 +02:00
Hannes Janetzek c99ae9237e make sure BLEND is enabled 2013-10-09 01:55:47 +02:00
Hannes Janetzek 088f3e2385 enable glDepthMask before clearing depth buffer:
- fixes building rendering on nexus and asus tablet
2013-10-09 01:55:47 +02:00
Hannes Janetzek 4ac9fc3b95 less GL_DETPH_TEST switches 2013-10-09 01:55:47 +02:00
Hannes Janetzek 9e84a42177 improve guess for building height, now skylines look better 2013-10-09 01:55:47 +02:00
Hannes Janetzek a03f81d306 only modify DEPTH_TEST through GLState 2013-10-09 01:55:47 +02:00
Hannes Janetzek 4f377cda46 theme tweaks, fix footway at z16 2013-10-09 01:55:47 +02:00
Hannes Janetzek 30fede04d2 magnetic-fling: move by screen size 2013-10-09 01:55:47 +02:00
Hannes Janetzek 70f2af2f33 set matrix manually 2013-10-09 01:55:47 +02:00
Hannes Janetzek 1807f0b9dc animate buildings 2013-10-09 01:55:47 +02:00
Hannes Janetzek 9d2ebab088 use specialized BinarySort for MapTiles that also repacks the 'sparsed' array 2013-10-09 01:55:47 +02:00
Hannes Janetzek ec647fc4f5 cleanups 2013-10-09 01:55:47 +02:00
Hannes Janetzek 406bea404d fix: dont crash on restart 2013-10-09 01:55:47 +02:00
Hannes Janetzek d0ad2f3bd4 - LineClipper added start(x0,y0), clipNext(x1,y1) 'state' clipping mode
- use vec4 array for extrusion colors -> set color only once for all tiles
- use full range for direction vector in extrusion vertex
2013-10-09 01:55:47 +02:00
Hannes Janetzek e9d2c88022 TileManager, JobQueue: use MapTile[] instead of list 2013-10-09 01:55:47 +02:00
Hannes Janetzek d94f8e2af4 ignore polygons that require additional nodes in trigulation 2013-10-09 01:55:47 +02:00
Hannes Janetzek 05e6490d3a cleanups 2013-10-09 01:55:47 +02:00
Hannes Janetzek a61d2d4804 refactor: use getColor() 2013-10-09 01:52:20 +02:00
Hannes Janetzek ed39f9fe34 buildings: decrease contrast with z-distance 2013-10-09 01:52:20 +02:00
Hannes Janetzek 70b7c79a8e started paged-fling mode, not enabled yet 2013-10-09 01:52:20 +02:00
Hannes Janetzek cb9cd645af allocate larger buffers for triangulation... 2013-10-09 01:52:20 +02:00
Hannes Janetzek 2e7a827117 improve finding point inside holes 2013-10-09 01:52:20 +02:00
Hannes Janetzek def840b482 cleanups 2013-10-09 01:52:20 +02:00
Hannes Janetzek bf7d5569e9 fix clipping when drawing proxies 2013-10-09 01:52:20 +02:00
Hannes Janetzek 885eec73d5 cleanup, less bright buildings 2013-10-09 01:52:20 +02:00
Hannes Janetzek 28278ba102 start actual BuildingOverlay 2013-10-09 01:52:20 +02:00
Hannes Janetzek 7cc32f1572 use GLState for depth and stencil test 2013-10-09 01:52:20 +02:00
Hannes Janetzek e50ea0c2ba refactor: move rendering of base layers to separate class
- keep track of GL state in GLState
2013-10-09 01:52:20 +02:00
Hannes Janetzek 99ce02a9bd -rename BuildingOverlay -> ExtrusionOverlay,
even if there is probably nothing else to extrude
- started to draw extrusion layer for proxy tiles
- fixed depth offsetting..
2013-10-09 01:52:20 +02:00
Hannes Janetzek 0c023f9989 handle explicitly closed properly:
- make buildings work with vector-tile-server and old pbmap backend
2013-10-09 01:52:20 +02:00
Hannes Janetzek 35923938db use glCullFace GL_FRONT to avoid having to flip triangles
triangle-jni: some loop optimizations
2013-10-09 01:52:20 +02:00
Hannes Janetzek 45b19d6a91 fix triangulation of complex polygons:
find coordinates inside hole non-convex holes
2013-10-09 01:52:20 +02:00
Hannes Janetzek 3484110e08 avoid sqrt, just flip that vector 2013-10-09 01:52:19 +02:00
Hannes Janetzek 6681247215 add safety check...
jni => for the real segv!
2013-10-09 01:52:19 +02:00
Hannes Janetzek 230f9b2828 enable polygon offset again 2013-10-09 01:52:19 +02:00
Hannes Janetzek c2f5755e64 clear Clipper when layer is compiled 2013-10-09 01:52:19 +02:00
Hannes Janetzek 1887d753c8 add triangle jni source 2013-10-09 01:52:19 +02:00
Hannes Janetzek a4d2aafded theme tweaks 2013-10-09 01:52:19 +02:00
Hannes Janetzek d5ba228fe5 - add building roof outlines
- create extrusion vertices and indices in one loop
2013-10-09 01:52:19 +02:00
Hannes Janetzek c01252f249 - fix roof triagulation for polygons with holes
- omit indices for outline outside tile boundaries
2013-10-09 01:52:19 +02:00
Hannes Janetzek eb278585fa more work on building layer 2013-10-09 01:52:19 +02:00
Hannes Janetzek 74ca621de0 reorder TileGenerator functions 2013-10-09 01:47:44 +02:00
Hannes Janetzek 49055f2cc2 docs 2013-10-09 01:47:44 +02:00
Hannes Janetzek cfa56c00f6 move TileGenerator from 'renderer' to 'generator' package 2013-10-09 01:47:44 +02:00
Hannes Janetzek ac63a4cae1 add beginnings of BuildingOverlay 2013-10-09 01:47:43 +02:00
Hannes Janetzek f761be1999 refactor: rename RenderOverlay classes 2013-10-09 01:47:43 +02:00
Hannes Janetzek 6c28a63cc1 poi search: use bounding box when available 2013-10-09 01:47:43 +02:00
Hannes Janetzek df7c7200e5 add animateTo for BoundingBox 2013-10-09 01:47:43 +02:00
Hannes Janetzek eb0b7a8c0c add beginnings of OverlayModel, rendering only a box atm
- modified gl projection so that map layer is always between near- and far-plane
2013-10-09 01:47:43 +02:00
Hannes Janetzek 9b0b2db57b fix wrap around date-line in label overlay 2013-10-09 01:47:43 +02:00
Hannes Janetzek 45cf6620a9 - keep track of vertex array state in GLRenderer.enableVertexArrays
- use static imports for GL functions
2013-10-09 01:47:43 +02:00
Hannes Janetzek a8b25d07ad keep tile loading state in JobTile.state 2013-10-09 01:47:43 +02:00
Hannes Janetzek 60637f7440 make uniform handle local var 2013-10-09 01:47:43 +02:00
Hannes Janetzek c9137aa790 pack colors to array before passing to gl 2013-10-09 01:47:43 +02:00
Hannes Janetzek e4276ae9c4 avoid overflow when reading more than 64k into buffer
(we had only two tiles where this could have happend :)
2013-10-09 01:47:43 +02:00
Hannes Janetzek c5663df198 close polygons implicitly when using OSciMap2 database 2013-10-09 01:47:43 +02:00
Hannes Janetzek 3c5efd17bd fix buffer overflow 2013-10-09 01:47:43 +02:00
Hannes Janetzek d5b480cf22 lint changed its opinion on whether FloatMath is faster than Math. need to do some benchmarks..
http://code.google.com/p/android/issues/detail?id=36199
2013-10-09 01:47:43 +02:00
Hannes Janetzek 4c458d9d1f improve dbg msg 2013-10-09 01:47:43 +02:00