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:
ChiaNing
2020-09-02 09:06:37 +08:00
committed by GitHub
parent dcfeb168e0
commit 883a0571a1
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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);
}
+2 -2
View File
@@ -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);
}
}