Commit Graph

888 Commits

Author SHA1 Message Date
Éric Lemoine d713c9b8ed Deal with null images 2013-02-17 23:07:58 +01:00
Éric Lemoine be6c1a1a27 Test the image layer renderer's transform matrix 2013-02-17 22:47:19 +01:00
Éric Lemoine 85eec4e9b8 Avoid busy-waiting while images load
This is to be in conformance with the work done with #184.
2013-02-17 22:47:19 +01:00
Tim Schaub 59a203b2b7 Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-02-14 17:18:00 -07:00
Éric Lemoine 02843939e3 Add ol.renderer.webgl.ImageLayer 2013-02-14 23:36:36 +01:00
Éric Lemoine 17a17b01b6 Add ol.renderer.dom.ImageLayer 2013-02-14 23:36:36 +01:00
Tom Payne f581040b0f Add ol.renderer.canvas.ImageLayer 2013-02-14 23:36:36 +01:00
Éric Lemoine b6b493c198 Use vec2 for vTexCoord 2013-02-14 11:54:01 +01:00
Éric Lemoine de7a1d8f81 Apply transform matrix to text coords
With this commit the transform matrix is applied to each texture coordinate, as opposed to each fragment. This leads to less calculation on the GPU.
2013-02-14 09:56:45 +01:00
Tim Schaub 2082ba7637 Fewer, bigger tiles 2013-02-13 15:51:06 -07:00
ahocevar 6b43435262 Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-02-13 12:30:16 +01:00
ahocevar e155f870cd Fixing RTree, and using it for retrieving geometries 2013-02-13 12:29:14 +01:00
Tim Schaub 3c4d218ec5 Only listen for first event 2013-02-07 14:06:05 -07:00
Tim Schaub 5bbd8fd9f3 Using ol.TileCache for managing canvas tiles 2013-02-06 18:23:39 -07:00
Tim Schaub 11b8c0ff47 Don't generate new tiles while animating 2013-02-06 17:47:03 -07:00
Tim Schaub e079c19413 Don't repeatedly render while waiting for tiles to load
Instead of going into an unnecessary animation loop, we can simply wait to be notified when tiles load.

The WebGL renderer still sets frameState.animate true, but I think this too should be unnecessary (full page example works without it, side-by-side example shows it cannot yet be removed).
2013-02-06 16:10:46 -07:00
Tim Schaub 2bd29ff60e Only track tiles that are actually wanted
Instead of keeping track of wanted tile ranges, we can instead track wanted tiles individually.  This provides enough for the map to know how to prioritize tiles and should be more efficient (no extra calls to extend tile ranges or check for tile containment within a range).
2013-02-06 16:08:24 -07:00
ahocevar 619803cdeb More goog.requires fixes 2013-02-06 16:36:42 +01:00
ahocevar a13e6bdfda Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-02-06 16:27:45 +01:00
ahocevar 61e4452c83 Adding missing and removing unused goog.requires 2013-02-06 16:26:24 +01:00
ahocevar 089b7013c2 Merge branch 'master' of github.com:openlayers/ol3 into vector
Conflicts:
	src/ol/renderer/canvas/canvasrenderer.js
	test/ol.html
2013-02-05 17:28:36 +01:00
ahocevar 386b97cf9a Merge branch 'master' of github.com:openlayers/ol3 into vector
Conflicts:
	src/ol/renderer/canvas/canvasrenderer.js
	test/ol.html
2013-02-05 17:17:09 +01:00
Tom Payne 1f460975bb Port WebGL texture cache to ol.structs.LRUCache 2013-02-04 18:37:12 +01:00
ahocevar 43dd9ca68c Don't use unshift 2013-02-02 12:29:08 +01:00
Tom Payne e6eb401e36 Add missing goog.requires 2013-01-30 23:47:13 +01:00
Tom Payne 6e247d9331 Rename modules for support detection 2013-01-30 22:48:03 +01:00
Tom Payne b6f856f962 Remove unused goog.requires 2013-01-30 22:48:03 +01:00
ahocevar e61c26830e Manage tile cache
This change implements a LRU policy for tile cachint, and keeps
128 tiles in the cache by default.
2013-01-30 17:09:43 +01:00
ahocevar 1ecbc36a39 Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-01-30 15:54:24 +01:00
Éric Lemoine 773e34d736 Merge pull request #165 from elemoine/classname
Change class names in DOM renderer
2013-01-29 04:02:18 -08:00
Tom Payne d22c441795 Merge pull request #162 from twpayne/canvas-visibility-and-opacity
Canvas visibility and opacity
2013-01-29 02:20:39 -08:00
Éric Lemoine 8713e84821 Change class names in DOM renderer 2013-01-29 10:24:25 +01:00
Tom Payne 3bd1b92b05 Promote renderFrame from ol.renderer.*.LayerRender to ol.renderer.LayerRenderer 2013-01-28 19:56:57 +01:00
Tom Payne 5558d6108c Promote handleLayerRendererChange from ol.renderer.webgl.Map to ol.renderer.Map 2013-01-28 19:56:56 +01:00
Tom Payne 49734de240 Promote dispatchChangeEvent from ol.renderer.webgl.Layer to ol.renderer.Layer 2013-01-28 19:56:56 +01:00
Tom Payne 4701d117f7 Always dispatch change events on load/opacity/visible changes 2013-01-28 19:56:56 +01:00
Éric Lemoine 1d2551dbcb Do not draw image if image is null 2013-01-28 12:41:46 +01:00
ahocevar 65b3bb70a1 Some optimizations
* Tiles are now cut out of the sketch renderer in a separate
  pass. This ensures that point features at tile borders appear
  at both sides of the border. However, if such features get
  added in a later tileRange rendering pass, tiles from a
  previous rendering pass will still not have that feature.
* The tile canvas is only created once, and cloneNode(false) is
  used to get a canvas for a new tile.
2013-01-25 16:46:12 +01:00
Tim Schaub a7737150fe Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-01-24 22:21:25 -07:00
Tim Schaub 4e3f984796 Properly rendering features to canvas tiles
It looks like this approach will work well for panning (as anticipated).  For animated zooming, it is not going to work as is.  It looks like the canvas tile generation is too much for this type of animation loop.  Though there are clearly still areas for optimization:

 * Don't create new tiles while animating between zoom levels.  Using existing tiles only while animating should bring a significant performance gain.
 * Simple spatial index for tiles - each tile coord in the matrix could have a feature lookup object (keyed by id).  This needs to account for rendered dimension (as witnessed by the point being cut by a tile).  Given that the current example uses only three features, adding the spatial index should only be a minor improvement.
 * Reuse a fixed set of canvas tiles that are generated at construction (and increased/decreased with view size changes).
 * If a fixed set of tiles is not used, at least new ones could be cloned from existing ones (minor).
 * Do some profiling to look for more ideas.

In addition, world-wrapping needs addressed.  I don't think this renderer is the right (or at least the only) place to address this.  And the cache of tiles needs to be managed for real.  But hey, at least we've got a working tiled vector renderer now.
2013-01-24 21:57:12 -07:00
Tim Schaub f2b325b430 Adding convenient tile labels for debugging
This will be removed when behavior is right.
2013-01-24 17:16:54 -07:00
Tim Schaub 033daa425b Reverting b0a7badc8f
I think it's complicating things at this point to deal with this.  Unfortunately, it's not proper dateline wrapping as is (only arbitrary tile range extent wrapping).
2013-01-24 17:15:32 -07:00
Éric Lemoine 98b264e8ce Add comment 2013-01-24 22:31:57 +01:00
Éric Lemoine 80b38e608b No more need for listener keys array 2013-01-24 22:31:53 +01:00
Éric Lemoine 4a64837ba1 Make map handle background color changes 2013-01-24 22:31:08 +01:00
Éric Lemoine 15898b559b Make map handle size changes 2013-01-24 22:31:08 +01:00
Éric Lemoine 71a462cd54 Make map handle view changes
With the frameState stuff the map renderer need not listen to view changes. The map renderer receives orders from the map. These orders are renderFrame_ calls with frameState objects representing the current state.
2013-01-24 22:31:06 +01:00
ahocevar b0a7badc8f Started on proper date line wrapping
What we want in the end is vector tiles repeated just as raster
tiles. This change only avoids repeated tiles with the same
content being rendered and stored in the cache.
2013-01-24 17:29:21 +01:00
Tom Payne 8cac270234 Use + rather than Number for string to number conversion 2013-01-24 16:31:56 +01:00
ahocevar fe605ceebb Better, but still not all the way there 2013-01-24 16:21:30 +01:00