fix batch bind (#12312)

* fix batch bind

* fix

* remove

* Update cocos/core/root.jsb.ts

* Update cocos/core/root.jsb.ts

* Update cocos/core/root.jsb.ts

Co-authored-by: ChiaNing <sun.clooud.mo@gmail.com>
Co-authored-by: Santy-Wang <wh19930829@qq.com>
This commit is contained in:
ChiaNing
2022-08-04 10:30:20 +08:00
committed by GitHub
parent accb187a9b
commit e19fe7ec9d
3 changed files with 26 additions and 1 deletions
+8 -1
View File
@@ -35,7 +35,14 @@ export { VertexFormat as UIVertexFormat };
export { Batcher2D as UI };
export { DrawBatch2D as UIDrawBatch };
export { UIDrawBatch };
/**
* @deprecated since v3.6.0, this is an engine private interface that will be removed in the future.
* @internal
*/
class UIDrawBatch extends DrawBatch2D {
}
markAsWarning(MeshBuffer.prototype, 'MeshBuffer',
[
+6
View File
@@ -409,6 +409,8 @@ export class RenderScene {
* @en Add a draw batch of 2d objects, all draw batches attached to the render scene will be submitted for rendering.
* @zh 增加一个 2D 渲染批次,渲染场景上挂载的所有 2D 渲染批次都会被提交渲染。
* @param batch The draw batch.
* @internal
* @deprecated since v3.6.0, this is an engine private interface that will be removed in the future.
*/
public addBatch (batch: DrawBatch2D) {
this._batches.push(batch);
@@ -418,6 +420,8 @@ export class RenderScene {
* @en Remove a draw batch of 2d objects, draw batch removed will no longer be submitted for rendering.
* @zh 删除一个 2D 渲染批次,移除的 2D 渲染批次将不再被提交渲染。
* @param batch The draw batch.
* @internal
* @deprecated since v3.6.0, this is an engine private interface that will be removed in the future.
*/
public removeBatch (batch: DrawBatch2D) {
for (let i = 0; i < this._batches.length; ++i) {
@@ -431,6 +435,8 @@ export class RenderScene {
/**
* @en Remove all 2d draw batches.
* @zh 删除所有 2D 渲染批次。
* @internal
* @deprecated since v3.6.0, this is an engine private interface that will be removed in the future.
*/
public removeBatches () {
this._batches.length = 0;
+12
View File
@@ -209,3 +209,15 @@ rootProto.setRenderPipeline = function (pipeline) {
this._createBatcher2D();
return ppl;
}
rootProto.addBatch = function (batch) {
console.error('The Draw Batch class is implemented differently in the native platform and does not support this interface.');
}
rootProto.removeBatch = function (batch) {
console.error('The Draw Batch class is implemented differently in the native platform and does not support this interface.');
}
rootProto.removeBatches = function () {
console.error('The Draw Batch class is implemented differently in the native platform and does not support this interface.');
}