mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
fix particle ia reuse (#7267)
* fix particle ia reuse * useless remove * fix trail & line Co-authored-by: ArthurWang <810612483@qq.com>
This commit is contained in:
@@ -212,8 +212,8 @@ export class LineModel extends Model {
|
||||
public updateIA (count: number) {
|
||||
const ia = this._subModels[0].inputAssembler;
|
||||
ia.vertexBuffers[0].update(this._vdataF32!);
|
||||
ia.indexCount = this._indexCount * count;
|
||||
this._iaInfo.drawInfos[0] = ia;
|
||||
this._iaInfo.drawInfos[0].firstIndex = 0;
|
||||
this._iaInfo.drawInfos[0].indexCount = this._indexCount * count;
|
||||
this._iaInfoBuffer.update(this._iaInfo);
|
||||
}
|
||||
|
||||
|
||||
@@ -326,8 +326,8 @@ export default class ParticleBatchModel extends Model {
|
||||
public updateIA (count: number) {
|
||||
const ia = this._subModels[0].inputAssembler;
|
||||
ia.vertexBuffers[0].update(this._vdataF32!);
|
||||
ia.indexCount = this._indexCount * count;
|
||||
this._iaInfo.drawInfos[0] = ia;
|
||||
this._iaInfo.drawInfos[0].firstIndex = 0;
|
||||
this._iaInfo.drawInfos[0].indexCount = this._indexCount * count;
|
||||
this._iaInfoBuffer.update(this._iaInfo);
|
||||
}
|
||||
|
||||
|
||||
@@ -557,8 +557,8 @@ export default class TrailModule {
|
||||
const subModel = subModels[0];
|
||||
subModel.inputAssembler!.vertexBuffers[0].update(this._vbF32!);
|
||||
subModel.inputAssembler!.indexBuffer!.update(this._iBuffer!);
|
||||
subModel.inputAssembler!.indexCount = count;
|
||||
this._iaInfo.drawInfos[0] = subModel.inputAssembler!;
|
||||
this._iaInfo.drawInfos[0].firstIndex = 0;
|
||||
this._iaInfo.drawInfos[0].indexCount = count;
|
||||
this._iaInfoBuffer!.update(this._iaInfo);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user