set model dirty when attaching to scene (#9674)

This commit is contained in:
Yun Hsiao Wu
2021-11-17 18:54:09 +08:00
committed by GitHub
parent cbc142f89c
commit 2ff4e8a8cf
4 changed files with 6 additions and 3 deletions
+2
View File
@@ -297,6 +297,8 @@ export class MeshRenderer extends RenderableComponent {
if (!this._model) {
this._updateModels();
}
this._updateCastShadow();
this._updateReceiveShadow();
this._attachToScene();
}
+3
View File
@@ -39,6 +39,9 @@ import { Sampler, Texture, Device, Format, SamplerInfo, Address, Filter as GFXFi
import { legacyCC } from '../global-exports';
import { errorID } from '../platform/debug';
import { murmurhash2_32_gc } from '../utils/murmurhash2_gc';
import { ccenum } from '../value-types/enum';
ccenum(Format);
const idGenerator = new IDGenerator('Tex');
/**
-3
View File
@@ -28,7 +28,6 @@
* @module gfx
*/
import { ccenum } from '../../value-types/enum';
import { Buffer } from './buffer';
import { DescriptorSetLayout } from './descriptor-set-layout';
import { Queue } from './queue';
@@ -1813,8 +1812,6 @@ export class DynamicStates {
* ========================= !DO NOT CHANGE THE ABOVE SECTION MANUALLY! =========================
*/
ccenum(Format);
/**
* @en GFX base object.
* @zh GFX 基类对象。
+1
View File
@@ -296,6 +296,7 @@ export class Model {
public attachToScene (scene: RenderScene) {
this.scene = scene;
this._localDataUpdated = true;
}
public detachFromScene () {