mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
remove uimeshbuffer sync to native floatsPerVertex (#12722)
This commit is contained in:
@@ -42,8 +42,7 @@ export enum MeshBufferSharedBufferView{
|
||||
vertexOffset,
|
||||
indexOffset,
|
||||
dirty,
|
||||
floatsPerVertex,
|
||||
count = 5
|
||||
count,
|
||||
}
|
||||
|
||||
export class MeshBuffer {
|
||||
@@ -100,9 +99,6 @@ export class MeshBuffer {
|
||||
}
|
||||
set floatsPerVertex (val:number) {
|
||||
this._floatsPerVertex = val;
|
||||
if (JSB) {
|
||||
this._sharedBuffer[MeshBufferSharedBufferView.floatsPerVertex] = val;
|
||||
}
|
||||
}
|
||||
|
||||
protected _vData: Float32Array = null!;
|
||||
@@ -186,7 +182,6 @@ export class MeshBuffer {
|
||||
this._initIDataCount = iCount;
|
||||
this._attributes = attrs;
|
||||
|
||||
//sync to native
|
||||
this.floatsPerVertex = getAttributeStride(attrs) >> 2;
|
||||
|
||||
assertIsTrue(this._initVDataCount / this._floatsPerVertex < 65536, getError(9005));
|
||||
|
||||
@@ -27,25 +27,6 @@
|
||||
#include "renderer/gfx-base/GFXDevice.h"
|
||||
|
||||
namespace cc {
|
||||
static const ccstd::vector<gfx::Attribute> ATTRIBUTES_V3F_T2F_C4F {
|
||||
gfx::Attribute{gfx::ATTR_NAME_POSITION, gfx::Format::RGB32F},
|
||||
gfx::Attribute{gfx::ATTR_NAME_TEX_COORD, gfx::Format::RG32F},
|
||||
gfx::Attribute{gfx::ATTR_NAME_COLOR, gfx::Format::RGBA32F},
|
||||
gfx::Attribute{gfx::ATTR_NAME_COLOR2, gfx::Format::RGBA32F},
|
||||
};
|
||||
|
||||
static const ccstd::vector<gfx::Attribute> ATTRIBUTES_V3F_T2F_C4B {
|
||||
gfx::Attribute{gfx::ATTR_NAME_POSITION, gfx::Format::RGB32F},
|
||||
gfx::Attribute{gfx::ATTR_NAME_TEX_COORD, gfx::Format::RG32F},
|
||||
gfx::Attribute{gfx::ATTR_NAME_COLOR, gfx::Format::RGBA8, true},
|
||||
};
|
||||
|
||||
static const ccstd::vector<gfx::Attribute> ATTRIBUTES_V3F_T2F_C4B_C4B {
|
||||
gfx::Attribute{gfx::ATTR_NAME_POSITION, gfx::Format::RGB32F},
|
||||
gfx::Attribute{gfx::ATTR_NAME_TEX_COORD, gfx::Format::RG32F},
|
||||
gfx::Attribute{gfx::ATTR_NAME_COLOR, gfx::Format::RGBA8, true},
|
||||
gfx::Attribute{gfx::ATTR_NAME_COLOR, gfx::Format::RGBA8, true},
|
||||
};
|
||||
|
||||
static uint32_t getAttributesStride(ccstd::vector<gfx::Attribute>& attrs) {
|
||||
uint32_t stride = 0;
|
||||
|
||||
Reference in New Issue
Block a user