mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
set model dirty when attaching to scene (#9674)
This commit is contained in:
@@ -297,6 +297,8 @@ export class MeshRenderer extends RenderableComponent {
|
||||
if (!this._model) {
|
||||
this._updateModels();
|
||||
}
|
||||
this._updateCastShadow();
|
||||
this._updateReceiveShadow();
|
||||
this._attachToScene();
|
||||
}
|
||||
|
||||
|
||||
@@ -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');
|
||||
/**
|
||||
|
||||
@@ -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 基类对象。
|
||||
|
||||
@@ -296,6 +296,7 @@ export class Model {
|
||||
|
||||
public attachToScene (scene: RenderScene) {
|
||||
this.scene = scene;
|
||||
this._localDataUpdated = true;
|
||||
}
|
||||
|
||||
public detachFromScene () {
|
||||
|
||||
Reference in New Issue
Block a user