mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
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:
@@ -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',
|
||||
[
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.');
|
||||
}
|
||||
Reference in New Issue
Block a user