Merge pull request #12976 from mike-000/WebGL-ReprojTile
Handle ReprojTile in ol/layer/WebGLTile
This commit is contained in:
@@ -512,7 +512,7 @@ class WebGLTileLayerRenderer extends WebGLLayerRenderer {
|
|||||||
* @param {import("../../PluggableMap.js").FrameState} frameState Frame state.
|
* @param {import("../../PluggableMap.js").FrameState} frameState Frame state.
|
||||||
*/
|
*/
|
||||||
const postRenderFunction = function (map, frameState) {
|
const postRenderFunction = function (map, frameState) {
|
||||||
tileSource.expireCache(tileSource.getProjection(), empty);
|
tileSource.expireCache(frameState.viewState.projection, empty);
|
||||||
};
|
};
|
||||||
|
|
||||||
frameState.postRenderFunctions.push(postRenderFunction);
|
frameState.postRenderFunctions.push(postRenderFunction);
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import EventTarget from '../events/Target.js';
|
import EventTarget from '../events/Target.js';
|
||||||
import EventType from '../events/EventType.js';
|
import EventType from '../events/EventType.js';
|
||||||
import ImageTile from '../ImageTile.js';
|
import ImageTile from '../ImageTile.js';
|
||||||
|
import ReprojTile from '../reproj/Tile.js';
|
||||||
import TileState from '../TileState.js';
|
import TileState from '../TileState.js';
|
||||||
import WebGLArrayBuffer from './Buffer.js';
|
import WebGLArrayBuffer from './Buffer.js';
|
||||||
import {ARRAY_BUFFER, STATIC_DRAW} from '../webgl.js';
|
import {ARRAY_BUFFER, STATIC_DRAW} from '../webgl.js';
|
||||||
@@ -152,7 +153,7 @@ class TileTexture extends EventTarget {
|
|||||||
const gl = helper.getGL();
|
const gl = helper.getGL();
|
||||||
const tile = this.tile;
|
const tile = this.tile;
|
||||||
|
|
||||||
if (tile instanceof ImageTile) {
|
if (tile instanceof ImageTile || tile instanceof ReprojTile) {
|
||||||
const texture = gl.createTexture();
|
const texture = gl.createTexture();
|
||||||
this.textures.push(texture);
|
this.textures.push(texture);
|
||||||
this.bandCount = 4;
|
this.bandCount = 4;
|
||||||
|
|||||||
Reference in New Issue
Block a user