Commit 63ecd3ba authored by 邱旭's avatar 邱旭

修复鸿蒙3.0问题,只是临时修复,不确定是否会有其他的影响

parent 5fe46a23
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -43,7 +43,7 @@ export default { ...@@ -43,7 +43,7 @@ export default {
resolve({}), resolve({}),
typescript(), typescript(),
commonjs(), commonjs(),
// isProd && terser(), isProd && terser(),
!isProd &&serve({ !isProd &&serve({
port:8099, port:8099,
headers: { headers: {
......
...@@ -360,7 +360,8 @@ export class BatchRenderer extends ObjectRenderer { ...@@ -360,7 +360,8 @@ export class BatchRenderer extends ObjectRenderer {
// this.indexBuffer.update(); // this.indexBuffer.update();
//暂时出现了bug,ios不做特殊处理先,以后有时间排查,暂时应该影响不大 //暂时出现了bug,ios不做特殊处理先,以后有时间排查,暂时应该影响不大
//貌似没问题了(20210601),但是感觉性能差别不大,先不加了,到时要加的话,也要打开start方法里的注释 //貌似没问题了(20210601),但是感觉性能差别不大,先不加了,到时要加的话,也要打开start方法里的注释
if (getOsType() == "ios" && false) { // TODO 华为鸿蒙3.0问题
// if (getOsType() == "ios" && false) {
//可能有一帧,在多个地方执行flush //可能有一帧,在多个地方执行flush
// this is still needed for IOS performance.. // this is still needed for IOS performance..
// it really does not like uploading to the same buffer in a single frame! // it really does not like uploading to the same buffer in a single frame!
...@@ -395,13 +396,13 @@ export class BatchRenderer extends ObjectRenderer { ...@@ -395,13 +396,13 @@ export class BatchRenderer extends ObjectRenderer {
this.vertexCount++; this.vertexCount++;
} // }
else { // else {
//
// lets use the faster option, always use buffer number 0 // // lets use the faster option, always use buffer number 0
this.vertexBuffers[this.vertexCount].upload(buffer.vertices, 0, true); // this.vertexBuffers[this.vertexCount].upload(buffer.vertices, 0, true);
this.indexBuffers[this.vertexCount].upload(indexBuffer, 0, true); // this.indexBuffers[this.vertexCount].upload(indexBuffer, 0, true);
} // }
// this.renderer.state.set(this.state); // this.renderer.state.set(this.state);
...@@ -479,9 +480,10 @@ export class BatchRenderer extends ObjectRenderer { ...@@ -479,9 +480,10 @@ export class BatchRenderer extends ObjectRenderer {
this.renderer.bindShader(this.shader); this.renderer.bindShader(this.shader);
// if (getOsType() != "ios") {//暂时出现了bug,ios不做特殊处理先 // if (getOsType() != "ios") {//暂时出现了bug,ios不做特殊处理先
this.renderer.bindVao(this.vaos[this.vertexCount]); // TODO 鸿蒙3.0问题
this.vertexBuffers[this.vertexCount].bind(); // this.renderer.bindVao(this.vaos[this.vertexCount]);
this.indexBuffers[this.vertexCount].bind(); // this.vertexBuffers[this.vertexCount].bind();
// this.indexBuffers[this.vertexCount].bind();
// } // }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment