mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Read a material's held texture through internals.js, pinned to Cesium's Material
dropPendingTexture reads the private material._textures; it now does so through internals.js like every other private field. The internals test fails when the installed Cesium no longer declares _textures or no longer takes a uniform's texture as Material updates.
This commit is contained in:
1 parent
f1817756ed
commit
4972aac345
3 files changed
+31
-1
No files matched your search
@@ -38,6 +38,7 @@ import { provideUnboundDraw } from '../rendererOf.js';
|
||||
import { listenerList, toCartesian, uncaught } from './common.js';
|
||||
import { createGpuIcons, GPU_ICON_CAPABILITIES } from './gpuIcons.js';
|
||||
import { createModelSets } from './drawModels.js';
|
||||
import { materialTexture } from './internals.js';
|
||||
import { createMeshSets } from './drawMeshes.js';
|
||||
import { createQuadSets } from './drawQuads.js';
|
||||
import { createCesiumFields } from './drawFields.js';
|
||||
@@ -3727,7 +3728,7 @@ export function createCesiumDraw({
|
||||
function dropPendingTexture(image) {
|
||||
const texture = image.texture;
|
||||
if (!texture || texture.isDestroyed()) return;
|
||||
if (image.material._textures?.image === texture) return;
|
||||
if (materialTexture(image.material, 'image') === texture) return;
|
||||
texture.destroy();
|
||||
image.texture = null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user